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

Which is the latest version of php?

1111


How can MYSQL functions be available with PHP?

1022


Explain what are the three classes of errors that can occur in php?

973


What is the main function of php?

1142


How would you open a directory for reading in php?

1019


where do we use htaccess?

996


How to support multiple-page forms?

975


How is session id stored in browser?

1005


How does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?

927


What is the use of explode() function?

1066


How to download file in php?

959


What are the different loops in php?

1073


Explain how can we increase the execution time of a php script?

1005


What is session expiry?

960


Explain the difference between array_merge() and array_combine()?

994