How can I test a new language ?

jackdaw

Joined: 2007-02-19
Posts: 12
Posted: Thu, 2007-03-22 21:15

We are in the process of translating Gallery 2.2 to Faroese, and would now like to test our work (the core module plus about 30 of the other modules). But I'm having problems with enabling this new language.

I've placed for instance the core module translation in /modules/core/locale/fo/LC_MESSAGES/, giving these folders the same permissions as the included languages.

I then managed to make Faroese show in the 'Language Settings' dropdown list under Gallery Site Administration -> General, by adding this to the modules/core/classes/GalleryTranslator.class, between similar language defining code:

Quote:
/* Faroese */
$supportedLanguages['fo']['FO']['description'] = 'Faroese';
$defaultCountry['fo'] = 'FO';

Then I selected Faroese as language default, and nothing happened. Following the instructions at FAQ: I changed the language but nothing happens, what's wrong?, I can confirm that fo_FO is there (fo_FO, fo_FO.iso88591 and fo_FO.utf8).

I read here that maybe I should rerun the config wizard or something, but cannot find this option in the Gallery Site Administration (or anywhere else for that matter). /setup/index.php points to nowhere, so I guess that this information is maybe not for Gallery 2.

What am I doing wrong or missing ?

 
alitissa

Joined: 2007-03-13
Posts: 30
Posted: Thu, 2007-03-22 23:30

I had the same problem when I started translating the greek language. I couldn't see any changes eventhough I had Greek Language sellected. But I was skipping a line in the localization instructions http://codex.gallery2.org/Gallery2:Localization. The line was the one below

"The translation files get cached by PHP (which is why it's so fast) so you may not see change until you restart your web server. "

...restarting the server for every new translation I was adding made it work.

Maybe you have the same problem?

 
jackdaw

Joined: 2007-02-19
Posts: 12
Posted: Fri, 2007-03-23 09:00

Thank you alitissa, that might be it. But then the problem is, that my sites are on a shared web server (at Dreamhost), which I don't think that I can restart.

 
alitissa

Joined: 2007-03-13
Posts: 30
Posted: Fri, 2007-03-23 11:52

I am testing the translations offline, on my computer. You can do this too. I am on windows xp and I use WAMP so that I have php/mysql/apache etc.. on my pc. You might want to try it this way.

 
jackdaw

Joined: 2007-02-19
Posts: 12
Posted: Fri, 2007-03-23 12:27

Yes of course, thank you. Only problem being (yes I know it, I'm a troublemaker :-)) that we are a group of people who translate, from different geographic locations.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2007-03-24 18:07

sounds like you were pretty careful to put things in the right place, so alitissa's suggestion seems likely.
you can also submit some of your translated files and get the next nightly snapshot.. then you'll know the files are setup ok and if you still can't see the translation, it must be your webserver.

 
jackdaw

Joined: 2007-02-19
Posts: 12
Posted: Sat, 2007-03-24 18:55

Thank you, yes... it is my webserver.

I've tested now with Gallery on a local installation of XAMPP, and alitissa's advice worked. Making the same editing as mentioned above, the new language didn't work until I had restarted XAMPP. So that was my problem.

We'll wait a while before submitting the translation files, as they are not that good yet :-)

(I would by the way be very happy, if somebody could tell me how to 'restart' my Gallery installation on a shared web host)

 
jackdaw

Joined: 2007-02-19
Posts: 12
Posted: Fri, 2007-04-20 23:27

Right, a workaround is to insert core module translation in '/modules/core/locale/fo/LC_MESSAGES/' and tweak 'modules/core/classes/GalleryTranslator.class' before actually installing Gallery. Your new language will then show up fine on the first page in the installation guide, and work if you choose it (maybe even if you don't :)).

I suspect that this works also when upgrading.