tags:

views:

74

answers:

3

Hi!

I am a php programmer and i have to develop a site in Japanese language using php. I know i have to use unicode for this. But did not find how to install the unicode and how to use it.

It would be great help if anyone provide me solution or the link.

Thanks in advance.

+3  A: 

Unicode is not something you install. It's a standard. The most common way is to make sure you are using the UTF-8 encoding for everything on the site (HTML output, database, etc.). The rest depends on how the content/translations are going to be handled, but there is nothing particularly special about Japenese from technical point of view.

Lukáš Lalinský
A: 

First, develop it in English, and reasonably debug it. Then use one of the multi-language kits (such as gettext) to add .jp translations.

wallyk
"Develop in English" is a sort of Anglo-centric way to describe it; most of the function names ARE in English, however it's completely possible to develop without ever knowing a word of English, provided there's documentation available in one's native language.
amphetamachine
It's quite some trouble to manage `.pot` files which you shouldn't put yourself through if you don't have to. Putting Japanese text directly in the source files is a perfectly valid way to write non-English apps. Only use `gettext` if a) **you** (the developer) don't understand Japanese and somebody has to translate the app or b) you're actually going to localize the app.
deceze
A: 

As Lukáš Lalinský has stated, unicode is a standard, it is not a piece of software that you can install into your computer. However, if you want to develop PHP websites for the Japanese language, you'll have to have an editor which can display Japanese. i.e. an editor which can map unicode characters with the appropriate (Japanese) fonts. Then, if you want to type Japanese, of course you'll need a Japanese IME (input method editor). My personal picks are vim, Eclipse, or Notepad++ if you're using Windows.

As a side note, you may want to have a look of the following settings in php.ini also:

  • mbstring.language
  • mbstring.internal_encoding
  • mbstring.http_input (actually this should be set to "auto" in general cases)
  • mbstring.http_output

Good luck!

shinkou