Recent Topics

1 Jul 30, 2003 19:27    

Hello!

I'd like to translate b2evolution to french, not only the templates / evoSkins, but all function's outputs, and eventually the admin part.
How to do that, keeping translations in upgrades, and maybe allowing other translations ?

I know that it may need -some- changes in the code, but could interest -some- users ;)

2 Jul 30, 2003 20:35

Multilanguage support should be introduced in version 0.9

Et parce que je suis moi même français, le français sera la première langue à être fournie en standard avec l'anglais! :)

3 Jul 30, 2003 23:02

Oh mais c'est génial :) ( it's fabulous !! )

Could i help Now to integrate this feature as quick as possible ?

Even if it's a boring work, for exemple replace all

 echo "string"; 


by

 tr_echo "string"; 


and put strings in a gigantic array..
I can do it 'coz i need it quick for a personnal project ;)

4 Jul 31, 2003 00:22

maybe we can start when 0.8.2 final is out.

but I'm still not sure about exactly how to implement it.

My main concern is about strings that include variables.

For example if the app is to say "Blog #2 ("Upgraded Blog") cannot be deleted because it contains 34 posts", the idea would be to have this:

$strCannotDeleteBlogBecauseOfPosts[EN] = 'Blog #%d ("%s") cannot be deleted because it contains %d posts';

$strCannotDeleteBlogBecauseOfPosts[FR] = 'Le blog n°%d ("%s") ne peut pas être effacé car il contient %d posts';

EN and FR are constants defined as 'en' and 'fr'.

These strings are intended to be used with printf. The problem is that printf has poor performance... so I'm not sure.

Maybe someting like $strCannotDeleteBlogBecauseOfPosts[EN] = 'Blog #$v1 ("$v2") cannot be deleted because it contains $v3 posts'; would be better... ? Also, this would allow for the parameter order to be different in some languages... which would probably be useful...

Yet another possibility is to cut the string into chunks so you can just pass comma separated variables to echo...

Has anyone ever benchmarked this ?

5 Jul 31, 2003 00:40

For now I do not know wich method is the best, but i know that IMP, the powerfull webmail uses gettext.

It seems to be fast (IMP is really fast!) and clean to use, but add a php' module dependancy.

phpBB2 use a big $lang array:
examples:

$lang['Record_online_users'] = 'Most users ever online was <b>%s</b> on %s'; // first %s = number of users, second %s is the date.
$lang['Click_view_privmsg'] = 'Click %sHere%s to visit your Inbox';
$lang['Inbox_size'] = 'Your Inbox is %d%% full'; // eg. Your Inbox is 50% full

used with:

'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),

Instead of loading all localisation data like with
$strCannotDeleteBlogBecauseOfPosts[EN], it includes /language/lang_english/lang_main.php and some other files in the directory.

It's faster than load all localisation data when using $strCannotDeleteBlogBecauseOfPosts[EN] and $strCannotDeleteBlogBecauseOfPosts[FR]

phpBB2 works fine, even it this project is not really known for it's speed ;)

What technologies use other projects ?

6 Aug 04, 2003 04:54

Hello François.

I just finished the french translation of Gallery (http://gallery.sf.net)
This project now use gettext with php, and has an abstraction layer if gettext is not present with php installation.

Gettext is fast, convenient to use (Gallery exist for years but wasn't localized since 2 month) and nice editors are available to translate and keep translations up to date. (I used poedit).
Sync with new strings to translate from php sources are made by automated scripts..

Even in php, gettext is a really nice solution !

7 Aug 07, 2003 23:37

Okay I have the backoffice menu running with gettext here.

Seems to work pretty fine and the gettext tools make it easy to update the translations on the run... :idea:

So we'll probably go with gettext.

I'll make an announcement as soon as I have the bare minimum implemented so people can start translating.

8 Aug 08, 2003 15:12

If you are interested in a Swedish translation, I can be of service...

Have been thinking about translate everything myself, but it's a lot of text in a lot of different files, so a built in support for different languages would be interesting.. :)

Great script by the way... :D

9 Aug 08, 2003 15:33

All translation efforts are welcome.

I am building in "GNU gettext" support.

You'll be able to translate using the GNU gettext tools.

There's also a GUI tool to translate, called poedit.

If you want, you can start looking into these.

Also, I'd be glad to know if any of you (excepted curio) has any previous experience with gettext or with another general purpose localisation system... ?

11 Aug 08, 2003 16:19

Yes I use these two and I'm working on Windows too ;)

14 Jan 12, 2004 21:39

i offer a galizian translation too (northwest of spain)

;)

15 Jan 12, 2004 22:51

yes please. send me the language files ;)


Form is loading...