Hi, I'd like to show Loginza in french for my users, but it is in english.
Since loginza is russian I suppose the english language is set somewhere in the module.. Is it possible to set it to another language and how please?

Comments

Vagrant-1’s picture

Hey, will somebody answer to this issue?? I have the same question that alliax, however I was looking for the language strings in the module files hoping to translate once I could find them, but never happens, it seems that this module loads info and text strings from loginza site or identity providers, still should be a way to put some config options as in other modules to change this, for example internationalization such as facebook related modules that let you choose your language e.g Spanish should be (es_ES), French (fr_FR)....

Vagrant-1’s picture

Priority: Normal » Critical

Well, there are good and bad news, alliax, I recently found where you can change the language when loginza shows providers in login page, the function is located in the archive loginza.routines.inc that is just inside inc file. At the bottom of this archive you can see the next function:

1

2   function _loginza_param_lang($lang = NULL) {
3    $all_langs = array('en', 'ru', 'uk');
4
5    if (empty($lang) || !in_array($lang, $all_langs)) {
6      global $language;
7      $lang = in_array($language->language, $all_langs) ? $language->language : 'fr';
8    }
9
10  return $lang;
11  

Note that I have change the default language at line 7 ending (which initially was 'en') to 'fr' in order to catch French, I had tested and works as expected, so it should be enough for you. However, I don´t know what´s going on with Spanish since I equally change the variable value to 'es', that is obviously the Spanish prefix to this language matters but did not work. Need some help, please...!!!

alliax’s picture

hi, thanks for your feedback on your findings, for spanish, try maybe sp instead of es, since we can see that they use uk instead of en-gb for british english, so sp could work for spanish too. Worth a try.
ps: maybe uk is used for ukranian, in that case i made a mistake, but still sp is sometimes used to describe spanish language instead of es for espanol.