internationalization - How to internationalize a PHP Web Application? -


we have php application designed work particular country, normal characters. application has normal modules found in of applications, such register/login module, text editor, post texts, read/write database, search module...

i did in past, can't remember steps transform application international one, supporting kind of characters (chinese, japanese, russian, etc).

i have developed scripts in order to:

  • change codification of files utf-8
  • change codification of database (database itself, tables , text/varchar fields)
  • set database utf-8 everytime make instance of (set names utf8)
  • change string functions multibyte (e.g.: substr() mb_substr())
  • get templates , setting encoding utf-8 (<meta http-equiv="content-type" content="text/html; charset=utf-8" />)

edit

  • unit testing (thanks marcel djaman)
  • add accept-charset="utf-8" forms (thanks jason spicer)
  • use iconv (thanks robert pounder)

is there other step should take?

how can check in application thousands of pages work?

the thing have missed out utf8_encoding / utf8_decoding on pages.

https://secure.php.net/manual/en/function.utf8-encode.php

https://secure.php.net/manual/en/function.utf8-decode.php

also may need use iconv:

https://secure.php.net/manual/en/function.iconv.php

note:

utf8_encode() convert iso-8859-1 utf-8 have use iconv in instance.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -