Jump to content

[SOLVED] Multilanguage Support


Juanu

Recommended Posts

Hi Everyone!

I'm making a new module, in which the user will enter some information which should be different on each language.

So, i need to make my text fields work with multilanguage support just like the product name fields, that have the flag on the right side, and you can chose which language you are editing. Can any of you tell me how to implement this on a custom module?

Thank you!

Juanu

Link to comment
Share on other sites

You can see example in editorial module (Home editor)

        global $cookie;
       /* Languages preliminaries */
       $defaultLanguage = intval(Configuration::get('PS_LANG_DEFAULT'));
       $languages = Language::getLanguages();
       $iso = Language::getIsoById(intval($cookie->id_lang));
       $divLangName = 'title¤subheading¤cpara¤logo_subheading';



and then later

$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'title', true);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...