xoops forums


Core Developer
Posted on: 2009/4/24 13:05
trabis (Show more)
Core Developer
Posts: 2269
Since: 2006/9/1 1

Re: utf-8 and portuguese

Oh, big issue is the encoding. I know we are supposed to move to uft8, but I(and I believe all users from latin derivated languages) am feeling reluctant to change.

Changing or not changing, we should have the encoding appended to the folder name.
utf8_portuguese_pt, portugues_pt-utf8, whatever.


Community Support Member
Posted on: 2009/4/24 14:28
ghia (Show more)
Community Support Member
Posts: 4953
Since: 2008/7/3 1

Re: utf-8 and portuguese

The encoding is a big problem for legacy sites in European languages (eg French, German, ...), which uses a lot of accented characters (128 - 255 in ascii). At the time being users with such sites are adviced to leave their site and database in the original encoding. Conversion is not straight forward, because the many ISO variants used. And on top of that, the database tables are often also cluttered by windows character sets.

For the language files, there is a need to have two encodings for the same language. The conversion (from ansi to utf without bom) can easily be done with eg Notepad++. This is needed for all language definitions and templates.
There is no need to rename the language directories itself as Trabis suggests, but the archives should contain two extra directories in the root: iso and utf, which will then contain the normal directory tree with all the language files.
A partial example for the mrbs module and french could be:
| |_mrbs
|   |_index.php
|   |_xoops_version.php
|   |_lang.fr
|   |_admin
|   |_language
|     |_french
|       |_main.php
| |_modules
|   |_mrbs
|     |_lang.fr
|     |_language
|       |_french
|         |_main.php
The module itself contains by preference default the utf language files. When the other encoding is needed, a simple copy or upload can easily be used to overwrite all relevant files.