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 best php version for wordpress?

1086


How is a session id generated?

984


Where is php code written?

980


Explain type casting and type juggling.

1013


What does it mean when it says the csrf token is invalid?

886


What is difference between mysqli and mysql?

1045


What are the encryption functions available in PHP?

1113


How to convert numbers to strings in php?

996


Explain Traits in PHP?

932


What are the different types of PHP arrays?

1059


What is substr() in php? And how it is used?

1025


What is inheritance in php? How many types of inheritance supports php?

983


What is variable give example?

1044


Explain the ternary conditional operator in php?

1079


What is the difference between Split and Explode in PHP?

1036