• Resolved boeglin

    (@boeglin)


    Hi again,
    I’ve loked the forum https://www.ads-software.com/support/topic/multilingual-website-17/
    but the solution doesn t work or I do something wrong. We have a mutlilingual site on WP 4.9 with PUblisho theme

    I have activated the Mutlingual Site option. The problem is that the pages in Spanish or Poruguese recieve the same treatment than French one: non breaking space before? or : ; etc. How do your plug-in recognize the language of the page; it does it automatically?
    – SO i have to put the ID of every page in spanish or portuguese to ignore it in the Option Ignore ID?
    – Can i Use the permalink (permalien) or it must be the original ID of the post.
    – My english is no so fluent to understand exaclty the disccusion above; i understand I do have to put something in the body ; what kind of syntaxis? I have no a very deep experience of coding.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author pepe

    (@pputzer)

    It uses the WordPress function get_locale() to determine the current locale. What plugin do you use for multilingual support? The mechanism won’t work if the whole site is set to fr_* and only the post content is in another language.

    Thread Starter boeglin

    (@boeglin)

    Ah, ok, thanks for the information. As multilingual plug-in, there is Loco installed. Shoud we to install also Polylang or an equivalent multilingual support?

    Plugin Author pepe

    (@pputzer)

    @boeglin, I assume you mean Loco Translate? As far as I understand it does not provide multilingual support for WordPress content, but is a tool for developers to translate themes and plugins (i.e. non-content, static strings).

    Plugin Author pepe

    (@pputzer)

    @boeglin: Have you been able to resolve the issue?

    Plugin Author pepe

    (@pputzer)

    I assume the issue has been resolved.

    Thread Starter boeglin

    (@boeglin)

    Thanks fr your interest.
    I tried with Polylang and G Translate, but both created problems with the menus or disorganised the features of pages. It s a pity because your app was working quite good, even if some little détails i told in an other mail could be done.
    So i just give up, no time to look how to fix it.
    May be by fixing a code on each page to indicate the language, but I saw somewhere it was not recommended, and do not know which code to indicate.
    Yours,
    +

    Plugin Author pepe

    (@pputzer)

    Well, for the automatic language switching to work, you have to let WordPress and wp-Typography know that a certain page is supposed to be in a different locale. If you don’t want to use a multilingual plugin, you could use the filter hook typo_current_locale to change the locale just for wp-Typography. Alternatively, you could also use wp-Typography’s extensive API to adjust the settings manually via the typo_settings hook.

    Thread Starter boeglin

    (@boeglin)

    The ideal would be form Typo’s hook to be able select the lenguage attribute (FR, SP, EN…) to give to every page of the site; all the rest for me is confusing, my knowledge in php too much limited.. If i find time, i’ll be looking for on forums, I dont know where to find ” filter hook typo_current_locale” on my pages. But thanks.

    Plugin Author pepe

    (@pputzer)

    Here’s a tutorial on WordPress filter and action hooks. Probably the easiest solution would be to make a specialized page template for each language you’d like to use and add the following code at the beginning of the template. Then you could assign these templates to the pages in question.

    
    function <your_prefix>_filter_typo_locale_<language>() {
        return '<locale>';
    }
    add_filter( 'typo_current_locale', '<your_prefix>_filter_typo_locale_<language>' );
    

    <your_prefix> should be replaced by a unique string of your choice, <language>by the language name in question and <locale> with the relevant locale string from this list.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Multilingual’ is closed to new replies.