Joomla!, Wordpress tips for building your site

How to internationalize your site with Wordpress (qTranslate)(2)

Published on| December 26th, 2009 | 1 Comment.

The post “How to internationalize your site with WordPress (qTranslate)” was written before.

In previous post, I described any works to install of qTranslate, and to edit of translation.
Here, in addition, I will describe also any works to be work better ‘qTransrate’.

What is plugin that should install with qTranslate?

  • Google XML Sitemaps with qTranslate Support
    – Literally, this plugin is ‘Google XML Sitemaps’ that compatible with ‘qTranslate’.
    If you use this plugin, ‘Google XML Sitemaps’ (origin) must be removed.

qTranslate problems

  • On WordPress upgrade windows, you may not find a upgrade information of mother tongue.


    (Originally, there are upgrade information to support mother tongue like following image.)

    If you change php-code like a following code, this problem will clear.

    function qtrans_versionLocale() {
    //	return \'en_US\';
    	return \'ja\';

    In above example code, I changed to the Japanese from English.(you may change to your mother tongue from ‘ja’ .)

  • Problem of date

    After installing qTranslate, you might notice incorrect date of your WordPress site.

    Most factor of this problem is that qTranslate was compatible between ‘Date’ and ‘Strtime’.
    If you are able to rewrite your thema(template) like a following code, you will clear this problem.

    This is, qTranslate the date, strtime is often by allowing the evils of compatibility.
    Here, qTranslate addition, the theme (template), so you can respond, write to the address below.

    In the theme, if you set a date format, you must not use format ‘n’ (day with no additional zero).
    You should use ‘m'(day with additional zero) instead of ‘n’.

    This will change as follows.

    If you know php-language, you will understand what this change is.
    So, ‘strtime’ has not format ‘n’ of ‘date’.

    Following , it is convert array list from a format of ‘date’ to a format of ‘strtime’ with qTranslate.
    You can find a date format that you set in theme. So, you can check whether your date format work well with qTranslate.

    	$mappings = array(
    		\'d\' => \'%d\',
    		\'D\' => \'%a\',
    		\'j\' => \'%E\',
    		\'l\' => \'%A\',
    		\'N\' => \'%u\',
    		\'S\' => \'%q\',
    		\'w\' => \'%f\',
    		\'z\' => \'%F\',
    		\'W\' => \'%V\',
    		\'F\' => \'%B\',
    		\'m\' => \'%m\',
    		\'M\' => \'%b\',
    		\'n\' => \'%i\',
    		\'t\' => \'%J\',
    		\'L\' => \'%k\',
    		\'o\' => \'%G\',
    		\'Y\' => \'%Y\',
    		\'y\' => \'%y\',
    		\'a\' => \'%P\',
    		\'A\' => \'%p\',
    		\'B\' => \'%K\',
    		\'g\' => \'%l\',
    		\'G\' => \'%L\',
    		\'h\' => \'%I\',
    		\'H\' => \'%H\',
    		\'i\' => \'%M\',
    		\'s\' => \'%S\',
    		\'u\' => \'%N\',
    		\'e\' => \'%Q\',
    		\'I\' => \'%o\',
    		\'O\' => \'%O\',
    		\'P\' => \'%s\',
    		\'T\' => \'%v\',
    		\'Z\' => \'%1\',
    		\'c\' => \'%2\',
    		\'r\' => \'%3\',
    		\'U\' => \'%4\'


One Response to “How to internationalize your site with WordPress (qTranslate)(2)”

  1. qTranslateのメモ – Aragorn
    September 30th, 2011 @ 16:43:10

Leave a Reply


Recent Posts


Tag Cloud

execute remove フロントページ 投稿ページ トップページ install WIndows Note Convert META generator 日付 donwload file manage multibyte utf-8 unicode shiftjis euc console サイトマップ 問題 ParmaLink Redirect パーマリンク はみ出る pre テンプレート テーマ タグクラウド マルチランゲージ リダイレクト PHP(タグ) タグ table control HTML(タグ) コマンド 国際化(翻訳) SQLite(タグ) MySQL(タグ) qTranslate プラグイン(タグ) Wordpress(タグ)


Site Description

Joomla!, Wordpress as CMS using a site building, site management, software usage to describe the development tips.

  • はてなブックマークへ追加する
  • Facebookでシェアする
  • twitter でつぶやく
  • Google Plusでシェアする
  • Pocketでシェアする