News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Useful Tip Where Multiple Languages Are Posted

Started by archiebald, March 29, 2005, 11:42:56 PM

Previous topic - Next topic

archiebald

This may not work for all, but it solved my problem.

I have English and Japanese language packs installed (though Japanese is not finalized yet).  My board is predominantly English but I have a large percentage of Japanese users so posts are often made in Japanese.

The standard index.english.php file specifies ISO-8859-1 so any people using the English theme just sees garbled text when viewing one of the Japanese posts.

The posts apear correctly when they are using the Japanese language theme because index.japanese.php specifies UTF-8.

Simply changing the entry in index.english.php as follows will always force the users browser into UTF-8.  The english text is fine in this mode and the Japanese posts now display correctly.

line 16
// Character set and right to left?
$txt['lang_character_set'] = 'ISO-8859-1';
$txt['lang_rtl'] = false;


change to
// Character set and right to left?
$txt['lang_character_set'] = 'UTF-8';
$txt['lang_rtl'] = false;


Archie

Advertisement: