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 u mean by query?

0 Answers  


Which is true about the singleton design pattern?

0 Answers  


How to send Email using PHP with MySQL in Linux Server?..

3 Answers  


Write a function that takes "depth" as argument and return sum of node's data of that depth. For instance, (0) depth 0 / \ (10) (20) depth 1 / \ (40) (50) depth2 If I pass get_sum_by_depth(2) , it would return 90 (i.e. 40 + 50 )

0 Answers   Amazon,


What is ci framework in php?

0 Answers  






How many data types are used by php?

0 Answers  


What is the default time in seconds for which session data is considered valid?

0 Answers  


What are super global variables in php?

0 Answers  


what is the difference between mysql_fetch_array() and mysql_fetch_row()?

17 Answers   Google,


Which is the dependent variable?

0 Answers  


What are escaping characters?

0 Answers  


Explain php parameterized functions.

0 Answers  


Categories