PDA

View Full Version : How to change language?


Romario
09-21-2005, 02:38 PM
This scripts in lang directory have 2 lang. files (en.php and ro.php),
how to change en.php on ro.php?

David
09-21-2005, 03:29 PM
The language part of the script is not completed. Hopefully, we will finish this Autumn.

Serge
10-23-2005, 03:32 PM
Content visible to registered users only.

You have three ways:
First is to edit 'en.php'. Not all strngs are in the 'EN.PHP' (eq 'latest links'), so you need to add these strings to the $__LANG array. The index key of each string is the md5 hash of english string. For eaxample Content visible to registered users only.
This way guarantees ease of translation.

The second way is to make a ru.php based on en.php, and change the function get_tpl (in the include/functions.php file). This function constructs new object of IntSmarty class. just change the 'en' parameter to your language ('ru').

The third way is to translate all templates, drop all Smarty tags like {l}{/l} and so on.

Remember, that en.php and templates must be in UTF-8 encoding!

Actually the first two methods lets you to create a multilingual directory. Unfortunally the site names, descriptions and so on will not be translated anyway and there is no ways (AFAIK) to create multiple fields on different languages for one link :(

Cyclist
01-22-2006, 01:37 PM
I am also thinking of making a real multilingual link directory. At the moment it's only possible for the frontend but I have thought of a little workaround using css.

Assuming I want have it in German, and English I would have to install it in two language subdirectories (using the same database) or assigning different css according to the choosen language (which I don't know how to do it).

In fields allowing html I can assign special css to phrases and prevent foreign language phrases from being displayed using the display tag in css. (<span class="de">Ausrüstung</span><span class="en">Equipment</span>

The css would be:

Content visible to registered users only.


The only problem is that some fields as category name doesn't seem to accept html. Is there a way to force those field to acceppt html code?