How can I make a script that can be bilanguage (supports
English, German)?
Answers were Sorted based on User's Feedback
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 |
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 |
What is chrome logger?
What is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
what do you mean by webserver's document root?
What is string and its function?
What is the maximum size of a database in mysql?
What is the difference between Reply-to and Return-path in the headers of a mail function?
Is php harder than javascript?
Why do you need to filter out empty files?
How to get elements in reverse order of an array in php?
What is the use of "echo" in php?
What are php loops?
Do you know what is the differences between $a != $B and $a !== $B?