Want the product names in different language

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 21
Joined: Wed Jun 19, 2002 10:03 pm

Thu Sep 26, 2002 8:59 pm

I want to generate an order form in diffrent language.

I want to display the order entry page ...by default in Engish but in different language (say "Hindi" having Devnagari script and fonts are available in the same)

Also the order viewing will be in Hindi as well as in English too.

Can anyone help how do I change the language

With regards
Vikas Athavale


Fri Sep 27, 2002 12:44 am

pass a variable to the script to determine wich language you want displayed, if no variable is passed asume a language.
with that variable you can determine wich language you will have to display.

If you're using a database with product information or something like that you will have to make multiple fields for language-dependend data (like the field "description")

Greetz Daan


Fri Sep 27, 2002 12:54 pm

The best way is to install a language pack system into your site! The way this is achieved is:

First create a language folder, and then one for the language (eg Languages/English). In that folder place several files which are arrays. In the English one you'd have something like:
$lang['greetings'] = "Hello";
In the French one you'd have:
$lang['greetings'] = "Bon Jour";

Then, to display all the languages your visitors can choose from, just display the names of the language folders. On each page you'd have a variable to let you know which language they want to us, just simply include the file at the beginning. Then, when you want to place the greeting you just put $lang['greetings'] and it'll display the appropriate greeting for the selected language

Easy peasy ;)

Post Reply