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

How escape single quotes php?

0 Answers  


Explain the difference between php4 and php5.

0 Answers  


is 'easyphp' is compelete technology to design a phpmysql site?

3 Answers  


How to get elements in reverse order of an array in php?

0 Answers  


How to redirect https to http url through .htaccess?

0 Answers  






Why should I store logs in a database rather than a file?

0 Answers  


Tell me how comfortable are you with writing html entirely by hand?

0 Answers  


How are php sessions stored?

0 Answers  


If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? Can anyone explain how's the value of $$b=100

15 Answers   ABC, Asan, Indivar, Swistro Marketing Solutions,


What is action hooks and filter hooks?

0 Answers  


Explain Booleans in PHP?

0 Answers  


Who is the father of php and what is the current version of php and mysql?

0 Answers  


Categories