Hello! You are looking at an archived forum discussion from the old mahara.org website. You cannot reply to this topic, but if you wish to discuss it, you can sign up to mahara.org and ask about this in the new forums.

If you start to developing a language pack, you should make a copy of the en.utf8 language pack.

tar zcvf lang_XXXXX.tar.gz `find -type d -iname 'en.utf8' ->> creates a file with all folders and files to translate

create a new subfolder for your language pack and extraxt the tar file.

find -depth -type d -iname "en.utf8" -exec rename 's/en.utf8/xx.utf8/' {} \; ->> rename all en.utf8 folder to your xx shortcut

edit lang/xx.utf8/langconfig.php for your language:
$string['parentlanguage'] = '';
$string['strftimedate'] = '%%d %%B %%Y';
$string['strftimedateshort'] = '%%d %%B';
$string['strftimedatetime'] = '%%d %%B %%Y, %%I:%%M %%p';
$string['strftimedaydate'] = '%%A, %%d %%B %%Y';
$string['strftimedaydatetime'] = '%%A, %%d %%B %%Y, %%I:%%M %%p';
$string['strftimedayshort'] = '%%A, %%d %%B';
$string['strftimedaytime'] = '%%a, %%H:%%M';
$string['strftimemonthyear'] = '%%B %%Y';
$string['strftimerecent'] = '%%d %%b, %%H:%%M';
$string['strftimerecentfull'] = '%%a, %%d %%b %%Y, %%I:%%M %%p';
$string['strftimetime'] = '%%I:%%M %%p';
$string['strfdaymonthyearshort'] = '%%d/%%m/%%Y';
$string['thislanguage'] = 'English';

Modify $string['thislanguage'] = 'XXXXXXXX'; ->> entry in the dropdown-menu for your language

Adjust the other settings.

Additionally you need to translate the language strings for several xx_i18n() functions. I will ask Nigel to provide a file with all this array strings.

HTH

Heinz

Any menu for translating strings?

I wonder how I can translate strings. Should I use an editor?

I wonder there is a menu for translation in site admin menu, as in moodle.

Thanks in advance.

JD Park

Yes, you should use an

Yes, you should use an editor. Mitsuhiro Yoshi hacked the moodle translation thing to work with Mahara, but I haven't had time to look at it in any great detail. Best to stick with an editor for now. It's not too hard to do the translating work this way.

Corrections

Hi Heinz, and thanks for the hints provided.

Please note, there is a typo (missing trailing `) in the first tar command. This worked for me:
tar zcvf lang_XX.tar.gz `find -type d -iname 'en.utf8'`

Also, IMHO the correct form of the rename step is without the sed's substitute notation. This worked:
find -depth -type d -iname "en.utf8" -exec rename en.utf8 XX.utf8 {} \;

As a current maintainer of the Moodle admin/lang.php interface, I am going to save some time to hack the tool and incorporate it into the Mahara interface. I will stay tuned ;-)

David

language interface

Hello David,

thanks for your hints. I´m not vey comfortable with these commands ;-)

It would be great if the Mahara community would have a good translation tool. Thanks in advance

cheers

Heinz
Heinz Krettek
Heinz.Krettek@ewiesion.com
http://ewiesion.com

Translation tool contributed

FYI the translation tool is now available. See http://www.mahara.org/wiki/En/Developers/Language_Pack_Development