mscreolo / php-calendar

Automatically exported from code.google.com/p/php-calendar
0 stars 0 forks source link

Translate settings - how I can change the language to spanish? #110

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. go to calendar home page.
2. select setting
3. and here I can see only two posibilities "defaul" and "en"

What is the expected output? What do you see instead?
php-calendar-2.0-beta12

Please provide any additional information below.
In the calendar home setting page only see the "default" and "en" lenguage 
options and I can't change to another language.

Original issue reported on code.google.com by mdiba...@gmail.com on 9 Jan 2013 at 7:58

GoogleCodeExporter commented 9 years ago
Did you run the translate.php? What OS are you using? If it's Linux, do you 
have the appropriate locales installed? 
http://code.google.com/p/php-calendar/wiki/Localization for more info.

Original comment by sproctor@gmail.com on 10 Jan 2013 at 1:13

GoogleCodeExporter commented 9 years ago
I use windows 2003 server this xampp 1.8.
The translated.php was run with the following resulted:

Translating "bg" using command "msgfmt -o../locale/bg/LC_MESSAGES/messages.mo 
../locale/bg/LC_MESSAGES/messages.po" Translating "ca" using command "msgfmt 
-o../locale/ca/LC_MESSAGES/messages.mo ../locale/ca/LC_MESSAGES/messages.po" 
Translating "da" using command "msgfmt -o../locale/da/LC_MESSAGES/messages.mo 
../locale/da/LC_MESSAGES/messages.po" Translating "de" using command "msgfmt 
-o../locale/de/LC_MESSAGES/messages.mo ../locale/de/LC_MESSAGES/messages.po" 
Translating "es" using command "msgfmt -o../locale/es/LC_MESSAGES/messages.mo 
../locale/es/LC_MESSAGES/messages.po" Translating "it" using command "msgfmt 
-o../locale/it/LC_MESSAGES/messages.mo ../locale/it/LC_MESSAGES/messages.po" 
Translating "ja" using command "msgfmt -o../locale/ja/LC_MESSAGES/messages.mo 
../locale/ja/LC_MESSAGES/messages.po" Translating "nl" using command "msgfmt 
-o../locale/nl/LC_MESSAGES/messages.mo ../locale/nl/LC_MESSAGES/messages.po" 
Translating "zh" using command "msgfmt -o../locale/zh/LC_MESSAGES/messages.mo 
../locale/zh/LC_MESSAGES/messages.po" 

gettext-0.14.4.exe is run in (C:\Program Files\GnuWin32).

The file messages.mo don't exist in my server...

Original comment by mdiba...@gmail.com on 10 Jan 2013 at 2:52

GoogleCodeExporter commented 9 years ago
Is msgfmt in your path? If not, you generate the .mo files manually. You 
already pasted the commands, you'll just need to add the appropriate path.

Also, make sure PHP is built with the gettext extension.

Original comment by sproctor@gmail.com on 10 Jan 2013 at 4:02

GoogleCodeExporter commented 9 years ago
ok, I can generate the .mo file with msgfmt.exe.
Now I can select spanish language but the text in the page never change the 
language, always left in english.

The PHP is: GetText Support  enabled...

Original comment by mdiba...@gmail.com on 10 Jan 2013 at 4:07

GoogleCodeExporter commented 9 years ago
I can change the language now, I use the following code in setup.php:
case 'es':
    putenv("LANG=".'es_ES.ISO8859-1');
    setlocale(LC_ALL, 'es_ES@euro', 'es_ES', 'es', 'es_ES.ISO8859-1');
    break;

$locale = 'es_ES.ISO-8859-1';
$dominio = 'messages';
$directorio = 'locale';

putenv("LANG=".$locale);
bindtextdomain($dominio, $directorio);
textdomain($dominio);

source: http://www.forosdelweb.com/f54/traduccion-php-calendar-731270/

The only is that not translating all texts, foe example the week names...

Thanks for your help sproctor@gmail.com

Original comment by mdiba...@gmail.com on 10 Jan 2013 at 4:24

GoogleCodeExporter commented 9 years ago
The translation files may be a little stale. There's no real translation team. 
The last update I had for the Spanish translation was quite a few years ago. 
There are instructions on that page I linked earlier to help you translate it 
if you want to put the effort in.

Original comment by sproctor@gmail.com on 10 Jan 2013 at 4:39

GoogleCodeExporter commented 9 years ago
The spanish translation is very old. You can update the version located at 
https://www.transifex.com/projects/p/php-calendar/language/es/

Original comment by sproctor@gmail.com on 22 Apr 2013 at 10:19