Page 1 of 1

Converting language from english to korean?

Posted: Thu May 03, 2007 6:09 am
by suresh678
Hi all,

I want to change language changing in php. Suppose i want to change language from english to korean using php. How to use this in joomla CMS. I want to change total site changing into another language. I want to change that joomla site into multiple language. how? please help me.

Thanks & Regards,
Suresh

Posted: Thu May 03, 2007 7:38 am
by Chris Corbyn
The usual way to do this (forgetting whatever Joomla does) is to make sure all textual parts of your website are loaded from language files then create some function to pull in the appropriate file:

Example directory structure

Code: Select all

./lang
./lang/en/
./lang/en/welcome1.txt
./lang/en/welcome2.txt
./lang/en/prices1.txt
./lang/fr/welcome1.txt
./lang/fr/welcome2.txt
./lang/fr/prices1.txt
Example interface:

Code: Select all

<div class="something">
  <?php echo Language::retrieve("welcome2", "en") ?>
</div>
...
The language class would need to know something about the structure of your lang directory. It's probably best to load in the correct language in the controller rather than the view too.