Jump to content

storing translations


xploita

Recommended Posts

-translations for different languages are stored in .ini files.

-the choosen language is stored in a $_session['lang'] variable.

-for every file accessed i load the .ini file representing the $_session['lang'] and store it in the _strings() array.and use those strings for substitution.

 

The Question: is it better if i store the translated text once in a similar $_session variable for use during the whole session.or better to create a new instance of the i18n class and reload the .ini translation file for every new page the user access?

Link to comment
https://forums.phpfreaks.com/topic/46297-storing-translations/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.