May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Japanese and English in one WordPress post バイリンガルポスティング

WordPress is one of the better known blogging platforms out there and is used by people all over the world so I assumed (I know, assuming is often a bad thing to do 😉 ) that it was multilingual ready by default. After typing some Japanese into a post and clicking on Publish, a different picture became apparent. A long string of question marks ??????????? was what followed. I started searching Google for a solution to the problem and the following is the result. One fix led to another problem but in the end I’m up and running with WordPress installed in English but fully customized (just a few tweaks that should be included in the standard package in my opinion) to display Japanese or any language for that matter.

ワードプレスは残念ながら英語でインストールして直ぐ他言語を使用する事は出来ない。まあ、少なくとも私がインストールした方法だとね。Fantastico を使ったからかもしれません。とにかく一寸した微調整をしないと日本語ははてなマーク ??????? ばっかりになる。 でも直すのはそんなに難しくない。

1. When installing WordPress via Fantastico, the database that gets created is not set to use UTF-8 collation. Mine was set to Swedish, I think? At any rate, you need to change the collation to UTF-8. Here’s a quick tutorial on how to do that.

2. Next, you need to also convert all the tables in your database to UTF-8. You can do this directly via SQL commands or, if your site is hosted, which it most likely is if you used Fantastico, you can use PhpMyAdmin (accessible from within CPanel with most hosting services). Here are some links to help with that process (from WordPress and the previously linked tutorial)

3. I thought that would do it but for some reason I was still getting the question marks even after changing the database collation and converting all the tables to UTF-8. Then I stumbled onto a post that indicated I should remove the database collation commands from the config.php file in the WordPress directory root. I didn’t remove them but commented them out (use two forward slashes like this // ) and FINALLY I was able to type Japanese into my WordPress blog and have it interpreted correctly. Whew!

4. But the adventure didn’t stop there. I started working on a post and noticed that every time I used a comma, there was no space being inserted after the comma. Figured out that it was related to a bug in the theme I’m using (Atahualpa). Here are the instructions to get that issue fixed. You’ll need to be able to access files in your directory root (the same as in #3 above for accessing the config.php file).

Now, after performing those tasks, you can use Japanese (or any other language, I think) on your English version of WordPress. Happy blogging! お疲れさまでした!

Peace

Leave a Reply