Converting language from english to korean?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
suresh678
Forum Newbie
Posts: 2
Joined: Thu May 03, 2007 5:45 am

Converting language from english to korean?

Post 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
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
Post Reply