Greek Language Support

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
chiefrebelangel
Posts: 2
Joined: Mon Oct 01, 2007 2:41 am

Greek Language Support

Post by chiefrebelangel »

hey everybody.

Im new to this blog but already I think this is perfect for what I need to do.
Only I got one problem I need it to be in Greek for my client.

As I see it doesnt exist a greek translation I thought I make it myself but I get a weird problem doing so.

I took a copy of the serendipity_lang_en.inc.php in the language folder copied and renamed it.

When I start to translate and after saving the file, The letters i have changed get changed to latin characters again. They are in greek when i type but always gets changed to its responsive latin character after being saved.. I have UTF-8 encoding so it shouldnt be a problem.
Anyone got a clue, or even better anyone got a translation done :P

Best Regards

Anders
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Greek Language Support

Post by garvinhicking »

Hi!

The english language file contains the locale and charset it uses, ISO-8859-1. If greek is not part of ISO-8859-1, you must save the file in the proper charset you need, and also enter the right charset in that file.

Also, you should save the greek file in the lang/UTF-8/ subdirectory, with UTF-8 file encoding.

Best 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/
chiefrebelangel
Posts: 2
Joined: Mon Oct 01, 2007 2:41 am

Post by chiefrebelangel »

Hi Garvin

First I want to thank you for you early reply :)

Ok my problem is the following. I have changed the charset in the language file to the following

@define('LANG_CHARSET', 'UTF-8');
@define('SQL_CHARSET', 'utf8');
@define('DATE_LOCALES', 'el_GR.UTF-8, el_GR.UTF-8, greek, el, el_GR');

Moreover I have also put it in the utf folder.

Now my problem is the following that Whenever I translate an entry such as the one below here which is in greek characters

@define('NAME', 'όνομα');

After saving it makes it into latin charcers
@define('NAME', 'onoma');

or displays ??

This is in Dreamweaver so I tried changing in notepad and save it as utf compatible, then it works. the greek characters get correct displayed

But now i got errormessages such as this

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\serendipity\lang\UTF-8\serendipity_lang_gr.inc.php:1) in C:\wamp\www\serendipity\serendipity_admin.php on line 11

This is due to my editing in notepad most probably.

I dont know what to do else.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, Dreamwaver is often known to tamper with file encodings. SO using a different editor is better.

In your file now, there are invisible characters at the beginning of the file. Those are called "UTF-8 BOM sequence", those are 3 characters that the editor hides from you. But the characters are still there when PHP parses it, so you must make sure that your editor does NOT save a BOM sequence. Usually, all editors can be configured to not do that somehow.

I personally use UltraEdit32, which is able to save a file in "UTF-8 (Without BOM)" format.

Best 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/
Post Reply