So I make web page where I use languages slovenian, italian, russan and engilsh on same page. This webpage comunicates with php script. Php script is dealing with mysql databse. So my question is how to deal with php, I suppose that html and mysql will work fine, but how to configure php. I have not try it yet.
HTML To get all the correct characters all languages on HTML page I use:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
PHP To get all slovenina correct characters (specilly š,č,ž,Č,Ž,Š) I use at begging of the php script:
setlocale ( LC_ALL, 'sl_SI.UTF-8' );
$array = array (
"c",
"č",
"s",
"š",
"z",
"ž"
);
usort ( $array, 'strcoll' );
and to put data with php to mysql database I use before I make query: mysql_query("set names 'utf8'");
MYSQL DB In mysql in one table I will inesrt data writen in slovenina, english, russan and italy. So my table is declared as:
utf8_general_ci
PROJECT I work in php eclispe and mz project uses text file encoding as UTF8.
My question is how to set local in PHP for russan, italian and english local and how to in mysql? Should I have for each language itself it's own colum and set for these colum apropriate language (as utf8_general_ci)? I hope you understand me!