Good way to create script supporting translations?

A place to discuss Joomla! translation matters.

Moderator: infograf768

bizir
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Dec 11, 2012 6:05 am

Good way to create script supporting translations?

Postby bizir » Thu Dec 20, 2012 6:58 am

I'm creating an open-source cms and was just wondering that which is the best way to add localizations? I already decided to have them in files similar to lang.en.php. I would assume arrays, but in which form?

$lang['xyz'] = "Text goes here!";

Code: Select all

$lang['Text goes here!'] = "Translated text!";

Or should I create my custom parser and add localizations to a file, like this:

Code: Select all

"Text goes here!" = "Translated text!";
And then just parse it.


What would you suggest? I tried to search but no results for me.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18044
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Good way to create script supporting translations?

Postby infograf768 » Thu Dec 20, 2012 1:33 pm

I do not think posting such a question in Joomla forums will get any reply. ;)
We do not use .php files for language translations since 1.5 and switched to native php .ini parsing in 2.5.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

lisablaker82
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Dec 12, 2013 10:35 pm

Re: Good way to create script supporting translations?

Postby lisablaker82 » Sat Jan 04, 2014 1:48 am

Oh, was planning to ask questions on the same line regarding translations. Thanks for the information infograf768. :)


Return to “Translations”

Who is online

Users browsing this forum: No registered users and 9 guests