Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can I make a script that can be bilanguage (supports
English, German)?

Answer Posted / koushikgraj

1. create different files to store different languages
eg: languages/eng.php
languages/ger.php

2. add constant variables in both the files
eg: languages/eng.php :: define('QUES','How are you');
eg: languages/ger.php :: contains define('QUES','Wie geht
es Ihnen');

3. in template page need to use the constant variable to
load the different language
eg: <div><?php echo QUES;?></div>

4. load different files according to language request

5. ofcourse we need to use characters encoding UTF-8 in HTMl
or PHP pages.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the importance of "method" attribute in a html form?

1076


What are php errors?

1033


Is php front end or back end?

993


What language is php written in?

1121


What is the meaning of xdebug?

1011


How to get useful error messages in php?

1094


Is php a framework?

1027


How check variable is set or not in php?

937


Explain the importance of the function htmlentities.

1048


What is default session time in php?

1025


What type of headers have to be added in the mail function to attach a file?

1000


How can I increase my website session?

1112


Which function would you use to insert a record into a database in php?

1096


How do I install php?

1122


Explain what are psrs?

1009