-
LeonidS thanks for your reply. Can you advise on the sequence of events?
1- Assuming I'm installing French language, which method gets the keys from xml files to build the database (I presume this is mainly sys_localization tables,any other tables involved?).
2-Then after getting these new language keys into the database, which method is used to extract the new keys and build the cache file 'lang-fr.xml'.
3- Finally, how the Polyglot work? does it change the database? if this is the case, then 'restore' will only update the values of the keys which are already on the database, but will not process new keys added from Polyglot.
Explanation of the process will be really helpful for us to troubleshoot many reported problems with language keys on the forum.-
Yes, lang keys and strings are placed into sys_localization_ tables only. Yes, Polyglot creates the new pair key-string in the database tables `sys_localization_keys` and `sys_localization_strings` and then translates them to the language file (it is rewritten completely).
-
one last question, when polyglot rewrite the lang-php cache files after adding a new pair, which function does it use? is it restore or recompile function?
-
The following code:
if(!BxDolStudioLanguagesUtils::getInstance()->updateLanguageStringById($iId, $aStrings))
call the next one:
if($bRecompile)
$this->compileLanguage($aLanguage['id']);