Hello
I am trying to display foreign languages in PHP.
The translations for all the words need to be stored in PHP files.
Can anyone tell me what sort of encoding I need to use?
Does PHP support unicode?
If not, how do I save the foreign languages in the files?
what sort of character set do I need to use in the generated HTML pages?
thanks in advance
displaying foreign languages in PHP
Moderator: General Moderators
-
davidklonski
- Forum Contributor
- Posts: 128
- Joined: Mon Mar 22, 2004 4:55 pm
- PHP has unicode support via mb_* functions
- Even if you don't use that functions, you can set the Content-type header to include the character set used (actualy, you must do it to be compliant with http standards).
-
davidklonski
- Forum Contributor
- Posts: 128
- Joined: Mon Mar 22, 2004 4:55 pm
I am trying to do something like:
where <Japanese word> is an actual word in Japanese and the same goes for the French word
is it possible?
Under what sort of encoding do I need to store the file?
If I will later print those variables, will the output be in Japanese and French?
thanks
Code: Select all
<?php
$var1 = '<Japanse word>';
$var2 = '<French word>';
?>is it possible?
Under what sort of encoding do I need to store the file?
If I will later print those variables, will the output be in Japanese and French?
thanks