SiT! Bugs - SiT!
View Issue Details
0000659SiT!i18npublic2009-04-22 10:202009-08-16 14:38
0000659: Incorrect internationalisation saved in DB
When i look at the sit.log i get a lot of errors:

2009-04-22T09:25:17+02:00 /sit/ajaxdata.php Warning [2] include(C:\wamp\www\sit\i18n\ [function.include]: failed to open stream: No such file or directory (in line 49 of file C:\wamp\www\sit\lib\

When i look in the Db at the users table, i see a user (just one) with "defau" in his the column "i18n", that must have been there since version 3.41. When i change this manually to "fr-FR" the errors seems to disappear, but when he logs out, and back in again, it replaces the "fr_FR" with "defau" again, and the errors restart.

If he chooses the fr-FR file on the dropdown at login time, it writes"/i18n" to the DB which causes even more errors..

On the same issue, when i go to the config page to select the default i18n the block shows "ca-ES" as the default language, but in my and the it is specified as "en-GB" ???

If i change it here, to "en-GB", it adds an entry to the config table in the DB but it writes "//i18n//en-GB", which messes things up again, and in fact after this the config page still shows "ca-ES".
No tags attached.
has duplicate 0000660closed  Wrong function i18n_filename_to_code in (Win32) 
jpg i18n.jpg (259,737) 2009-04-22 13:58
Issue History
2009-04-22 10:20nicdevNew Issue
2009-04-22 10:43nicdevNote Added: 0000955
2009-04-22 13:57nicdevNote Added: 0000956
2009-04-22 13:58nicdevFile Added: i18n.jpg
2009-04-22 16:48ivanNote Added: 0000957
2009-04-22 16:48ivanAssigned To => ivan
2009-04-22 16:48ivanStatusnew => resolved
2009-04-22 16:48ivanResolutionopen => fixed
2009-04-22 16:48ivanPlatform => Windows
2009-04-22 16:48ivanFixed in Version => Current SVN
2009-04-22 16:48ivanTarget Version => 3.50
2009-04-23 09:56ivanRelationship addedhas duplicate 0000660
2009-08-16 13:17ivanFixed in VersionCurrent SVN => 3.50
2009-08-16 14:38ivanNote Added: 0001576
2009-08-16 14:38ivanStatusresolved => closed

2009-04-22 10:43   
Hi Ivan,

I had no setting in my before, but now i have added:

// Default Internationalisation tag (rfc4646/rfc4647/ISO 639 code), note the corresponding i18n file must exist in includes/i18n before you can use it
$CONFIG['default_i18n'] = 'en-GB';

directly in my config file, and also i have deleted the "//i18n//en-GB", from the db config table because it caused even more issues.

Language config = en-GB (set in -see not above about the config page not displaying correctly)
Our chosen languages to display = ALL, but nothing is written to the DB
Language chosen in the users profile = fr-FR according to the db table "users" but when i open the user's config page it show "default" which is not true.

Let me know if you need further info

2009-04-22 13:57   
Hi Ivan,

Ok for now the errors have stopped. I removed the i18n entries in the config table in the Db, and i added,

$CONFIG['default_i18n'] = 'en-GB';

to my file.

I had the user (french guy) logout of SiT and completely cleared his cache, cookies etc. and it seems now the most is solved.

What still remains is the following:

In the language lists not showing correctly, (see screenshot), and the following that keeps popping up in the sit.log:

2009-04-22T14:30:34+02:00 /sit/ajaxdata.php Warning [2] htmlentities() [function.htmlentities]: Invalid multibyte sequence in argument (in line 239 of file C:\wamp\www\sit\lib\
2009-04-22 16:48   
This is fixed in svn r5344

We were using a hardcoded path separator when generating the list of language codes from the language files
2009-08-16 14:38   
Released in 3.50rc1