• Resolved marcenis

    (@marcenis)


    How can I set the initial language of the site in English and as the main language from which to translate Italian instead?

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    Please check Auto switch to browser language option. I believe that this is not exactly what you want, but it is very close. In that case when an English speaking person visits your website, it will automatically switch the language to English.

    Thanks! ??

    Thread Starter marcenis

    (@marcenis)

    I don’t want this but I want as I wrote that the default language is English and the one to translate from is Italian

    Plugin Author edo888

    (@edo888)

    Hi,

    You may call doGTranslate(‘it|en’) javascript function on page load. This will change the language from Italian to English. But most likely this is going to cause a lot of headaches.

    Thanks! ??

    Thread Starter marcenis

    (@marcenis)

    non so scrivere codice puoi aiutarmi per fare questa operazione?

    Thread Starter marcenis

    (@marcenis)

    nel file footer.php del tema ho messo questo codice

    <script type = “text / javascript”>
    if (localStorage.getItem (“ChangeLanguageFirstTime”) === null) {
    doGTranslate (‘it | en’);
    localStorage.setItem (“ChangeLanguageFirstTime”, true);
    }</Script>

    però non funziona lo stesso come mai?

    Plugin Author edo888

    (@edo888)

    Hi,

    I believe it should be like this instead:

    
    <script>
    if(localStorage.getItem("ChangeLanguageFirstTime") === null) {
        doGTranslate('it|en');
        localStorage.setItem("ChangeLanguageFirstTime", true);
    }
    </script>
    
    Thread Starter marcenis

    (@marcenis)

    but it is the same as what I put

    Thread Starter marcenis

    (@marcenis)

    sorry I was wrong with your code it works thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘set initial site language in English’ is closed to new replies.