collectiveaccess/providence — pull request #13 by gautiermichelin (2013-01-08 22:00:21+00:00)
Title: initializeLocale helper allowing earlier locale setting through a dedicated cookie

Hi back Seth,

this pull request contains the dev I've made in exchange with Dimitar :
http://www.collectiveaccess.org/forum/topic.php?id=40022

This is the compilation of the 5 files modified to call a new initializeLocale helper function.
This function allows to initialize a locale declared in a special cookie before most of the code. That allows CA to load BaseModel::$s_ca_models_definitions with locale translations, which was impossible before.

It's a cookie based solution but fare more better than my former tentative to reload all strings recursively as it brings no performance loss.

Note : name of the cookie is CA_appname_ui_locale because that was what jumped straight of my head. Don't hesitate to bump back if you've another name.

Bye,

Gautier