Page 1 of 1

Greek Language Support

Posted: Mon Oct 01, 2007 2:46 am
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

Re: Greek Language Support

Posted: Mon Oct 01, 2007 9:17 am
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

Posted: Tue Oct 02, 2007 1:22 am
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.

Posted: Fri Oct 05, 2007 9:11 am
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