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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / hitesh patil

See PHP Scripts can be written only in english. If you want
support, i mean you want to see pages in Other languages
then use characters encoding UTF-8 in HTMl or PHP pages.
It will work.

Is This Answer Correct ?    5 Yes 6 No

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

Answer / rakesh kumar nautiyal

open the Language option

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More PHP Interview Questions

What is Apache's configuration file typically called?

0 Answers  


How to calculate the length of a string?

0 Answers  


What is indexing in mysql and how do we create indexing in mysql

4 Answers  


What does php exit do?

0 Answers  


What is php data type?

0 Answers  






Require_once(), require(), include(). What is difference between them?

0 Answers  


Define urlencode() and urldecode() used in php?

0 Answers  


How to set a page as a home page in a php based site?

0 Answers  


How do I know my xampp version?

0 Answers  


Explain mail function in PHP with syntax?

0 Answers  


How to run the interactive php shell from the command line interface?

0 Answers  


Which is better mysql or sql?

0 Answers  


Categories