Localization problem (minor).

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Localization problem (minor).

Post 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 ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Localization problem (minor).

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post by JWalker »

thanks, it works ! :)
Post Reply