2013-01-21, 17:27:03
(2013-01-21, 11:28:33)shawn_a Wrote: So do we also need to add a user date format or use it from Lang or provide a bunch of predefined ones?
Basically GetSimple needs to separate web site (frontend) settings and administration (backend) settings as regards language:
At least there should be a frontend language setting:
- language (gsconfig.php or better in settings), but overwriteable by plugins (I18N)
- and a function to retrieve the current language
Then, assuming the corresponding language is installed, defaults for the following can be taken from the GetSimple language file:
- locale (new)
- date/time settings (already exists, but should be able to use strftime)
The I18N plugin would still switch the language based on the user's language settings, but other plugins should be able to retrieve the current language with above mentioned language.
For the backend the language would still be the current user's language and the locale and date/time setting from the language file(s).
@Carlos: I like the idea to allow both old (date) and new (strftime) formats and decide which function to use based on the existence of "%".
P.S.: when setting the locale, LC_ALL should be used - this way numbers will also be shown in the correct format (. or , as decimal separator).