How to internationalize your site with Wordpress (qTranslate)(2)
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.
wp-content/plugins/qtranslate/qtranslate_hooks.php202 203 204 205
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’.Exmaple)
Y-n-j
This will change as follows.
Y-m-jIf 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\' );
You might also like:
Comments
One Response to “How to internationalize your site with WordPress (qTranslate)(2)”
Leave a Reply
September 30th, 2011 @ 16:43:10
[…] http://blog.off-soft.net/wordpress/plugin/qtranslate2.html […]