Advertisement:

Author Topic: Translation of website in different language using osclass language pack  (Read 89 times)

moinuddin

  • Full Member
  • ***
  • Posts: 186
Hi all,

I have installed the languages on my website ..but the problem is that it does not translate whole page (i was expecting something like google translator service that translates whole page)...

Any idea how to do that ..?...


WEBmods

  • Hero Member
  • *****
  • Posts: 872
Hello!

The language pack doesn't translate the following:

  • ads - user's need to translate them
  • locations - translation not supported without a core mod
  • categories - you can translate them in admin
  • custom fields - translation plugin available
  • plugins - some plugins support some languages, if not, they probably have a .pot/.po file which you can use to translate

Regards.

moinuddin

  • Full Member
  • ***
  • Posts: 186
Is it possible that it can call google translator to translate if a language is selected ?

For example if user selects Chinese language once then every time he opens the website in the browser it will open in Chinese as a language detected by his browser ..

Is this possible with some piece of codes ?..
 

WEBmods

  • Hero Member
  • *****
  • Posts: 872
Hmm, maybe something like this in functions.php:

Code: [Select]
function wm_language_js() {
    // Your Google translate code here. You can access the selected language with Params::getParam('locale');
}

function wm_language_changed() {
    if(Params::getParam('page') == 'language') {
        osc_add_hook('footer', 'wm_language_js');
    }
}
osc_add_hook('init', 'wm_language_changed');

Regards.

moinuddin

  • Full Member
  • ***
  • Posts: 186
Thanks webmods,

Will try it and will let you know