CMS MADE SIMPLE FORGE

Multilanguage CMS

 

[#7104] Add setlocale

avatar
Created By: Goran Ilic (uniqu3)
Date Submitted: 2011-11-04 16:13

Assigned To: Zdeno Kuzmany (xxl)
Resolution: Fixed
State: Closed
Summary:
Add setlocale
Detailed Description:
Add setlocale like setlocale(LC_ALL, array('en_US.UTF-8','en_US','english')); to
override default text strings like date, time, decimals based on language.

This could either be part of {MleCMS action='init' or add new variable like
{$lang_setlocale}

History

Comments
avatar
Date: 2011-11-04 17:25
Posted By: Zdeno Kuzmany (xxl)

Fixed in SVN.

Add setlocale to init action.

Thank you for youor feedback.
      
avatar
Date: 2011-11-05 09:56
Posted By: Goran Ilic (uniqu3)

Wow, this was fast :-)
Tested it and $lang_direction is great, with set_locale there is one problem as
not all server are setup the same, means that for example a french server
usually has fr_FR where Belgian could have fr_BE (had that issue recently) then
fr_FR setting wouldn't work.
Or for example on my dev environment (Apache/2.2.11 (Win32) PHP/5.3.0) it_IT
doesn't take effect where "italian" does, my suggestion would be a extra input
box where user can enter comma separated list for each language like.
Locale Input: de_DE.UTF8,de_DE,german or maybe there is some ready made script
available somewhere with a list of available options.
From my research i found out that in worst case mostly english string for
language works like mentioned above "italian" (with a problem that month names
are returned in lower case)
      
avatar
Date: 2011-11-05 15:05
Posted By: Zdeno Kuzmany (xxl)

OK. Parameter  locale is for option for  language in the modules. I add new
param for setlocale. Thank you for your feedback.
      
avatar
Date: 2011-11-05 18:54
Posted By: Goran Ilic (uniqu3)

Not realy a FR now but in theory just from user experience view maybe a dropdown
that generates available list with system('locale -a'); would be nice or maybe
add it to Help section so a user can check that with a UDT, allthough there are
then those Windows server :-) no idea how to get a list there.
      
avatar
Date: 2011-11-29 16:40
Posted By: Zdeno Kuzmany (xxl)

Added option for advanced users.
      
Updates

Updated: 2011-11-29 16:40
resolution_id: 6 => 7
state: Open => Closed

Updated: 2011-11-05 15:05
resolution_id: 7 => 6

Updated: 2011-11-04 17:25
resolution_id: 6 => 7

Updated: 2011-11-04 16:17
resolution_id: 5 => 6
assigned_to_id: 100 => 4236

Updated: 2011-11-04 16:14
description: Add setlocale like setlocale(LC_ALL, array('en_US.UTF-8','en_US','english')); to override default text strings like date, time, decimals based on language. => Add setlocale like setlocale(LC_ALL, array('en_US.UTF-8','en_US','english')); to override default text strings like date, time, decimals based on language. This could either be part of {MleCMS action='init' or add new variable like {$lang_setlocale}
resolution_id: => 5