0

hi,
i looking for a best way to translate a backoffice content.
options:

A- i can use a separate file each for a lang with all vars.
B- use a table with all data

both of this solutions have a big time to implement and in all areas that i creat
i need add the vars.
there is some best solution for this?
something that can translate all content like google translator?
thanks for your help
:)

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by srdva59
0

One way this is done is define all of your text as variables as follows:

$MOD_NEWS['TEXT_READ_MORE'] = 'Read More';
$MOD_NEWS['TEXT_POSTED_BY'] = 'Posted by';
$MOD_NEWS['TEXT_ON'] = 'on';

That would be your English module (e.g. en.php) You then produce a module with the same variable names with the appropriate translated text for each of the other languages. The French version (fr.php) would look like:

$MOD_NEWS['TEXT_READ_MORE'] = 'En savoir plus';
$MOD_NEWS['TEXT_POSTED_BY'] = 'Posté par';
$MOD_NEWS['TEXT_ON'] = 'à';

These all reside in a languages directory and you include the appropriate version based on a system-wide parameter for language that you set in a config module.

0

hi,
i have something like that:
pt.php -> DEFINE( "_analises", "Análises" );

and in backoffice simple put: echo _analises;
with this i have a lot of work may be someone have a easy way to do this?
something like google translator?
thanks :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.