Page 1 of 1

Localization problem (minor).

Posted: Tue Sep 13, 2005 3:07 pm
by JWalker
Hello,

I use Serendipity with Bulgarian localization (bg) (windows-cp1251). All is ok, when I am logged, cyrillic letters appear, because I have selected Bulgarian language as my language. When I log-out, Western ISO 8859-1 is used with default English language. Instead of cyrillic letters appears this:

Áåøå íàïðàâåíà íàñòðîéêà íà êîíòðîëåðà. Ïðîâåðåíà å çàùèòàòà. Çàäåéñòâà ñå ïðè 1100W, êîåòî å ïî-ìàëêî îò èçèñêâàíîòî â çàäàíèåòî - 1420W, âúïðåêè ÷å å óñòàíîâåíà ñêîðîñò íà çàäåéñòâàíå 5400rpm. Îò òóê ñëåäâà, ÷å èëè

Where I have to change something in the configuration or some PHP file, to get default windows-1251 / Bulgarian when I am not logged-in ?

Second issue is about 'View as PDF'. The export work, but the cyrillic text appears '... éêà íà êîíòðîëåðà. Ïðî ... ' in the PDF file. Any idea what can be done in this case ?

Re: Localization problem (minor).

Posted: Tue Sep 13, 2005 4:48 pm
by garvinhicking
Either you use Serendipity 0.9 with the UTF-8 setting, or you need to edit your language file in lang/* and change the LANG_CHARSET constant in the file to the charset you want. Then you also need to save the language file in that charset encoding.

I don'T really know about the PDF issue, as I'm not experienced with the windows-cp charset and what necessities it has...

Regards,
Garvin

Posted: Tue Sep 13, 2005 5:27 pm
by JWalker
Here is what is at the top of my serendipity_lang_bg.inc.php file

@define('LANG_CHARSET', 'windows-1251');
@define('DATE_LOCALES', 'bulgarian, bg, bg_BG');
@define('DATE_FORMAT_ENTRY', '%A, %B %e. %Y');
@define('WYSIWYG_LANG', 'en');
@define('LANG_DIRECTION', 'ltr');

which came with 0.8.4.

All is correct here. The problem arises when I logout. Then, when no user is logged in, the blog defaults to 'en' and 'Western ISO 8859-1' encoding. I suppose that there is somewhere in the files command that determines what language/encoding to be default when no user is logged-in.

Posted: Tue Sep 13, 2005 6:07 pm
by garvinhicking
Right, for that you need to look at lang_en.inc.php and change the charset ti wondiws-1251 as well.

(Or use UTF-8 for 0.9 as I mentioned)

Regards,
Garvin

Posted: Tue Sep 13, 2005 10:53 pm
by JWalker
thanks, it works ! :)