Joomla!, Wordpress tips for building your site

Joomla!, Wordpress tips for building your site

Syndicate this site using RSS

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

Published on| December 27th, 2009 | No Comment.

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

In previous post, I described any works to install of qTranslate, and to edit of translation,and Note.
Here, I will describe how qTranslate uses the data base and table.

Where does qTranslate preserve information on the translation?

In General, Internationalization (Multi Language) plug-in is two types.
A type is plugin that automatically translate. Another is plugin that edit translation.
The first type translates automatically by using web api like Google tranlator api, and even displays it.
So, you will not be able to edit information of transration.

The second type displays translation information by preserving information that you translated in the data base.
So, you will translate all posts yourself.

qTranslate is the second type.
Where does qTranslate preserve information on the translation?

The answer is one of the following three tables.

  • wp2_blog_off_posts: post
  • wp2_blog_off_terms: categories, tags
  • wp2_blog_off_options: blog options (title, description ,etc,.)

All tables have already existed before qTranslate installs it.

wp2_blog_off_posts: example set of post

wp2_blog_off_posts: This post has been set as follows.

[wp2_blog_off_posts. post_title: title of post]
<!–: ja -> Japanese Title <!–:–>
<!–: en -> English Title <!–:–>

[wp2_blog_off_posts. post_content: content of post]
<!–: ja -> Japanese Description <!–:–>
<!–: en -> English Description <!–:–>
<! – more ->
<!–: ja -> Japanese Content <!–:–>
<!–: en -> English Content <!–:–>

wp2_blog_off_terms: example set of categories, tags

It is saved characters that serialized like a following php code.

Array
(
    [WordPress] => Array
        (
            [ja] => ワードプレス
            [en] => WordPress
        )
);

wp2_blog_off_options: example set of blog options (title, description ,etc,.)

The option 'blogname' has been set as follows.

[:Ja]Blog title of Japanese [:en]Blog Title of English

In other words, if qTranslate does not provide a text-area for translation such as a setting manage windows, you can set information of translation like above example.
qtrs_3_1

<!–: en -> English Content <!–:–>
[:En]English Content

You will be able to use in post information of translation like above example.
For example, the following is embedded in the same way as above example.
You will notice change of view by switch Japanese and English.( :D )

qtrs_3_3



Add to your favorites(bookmarks): はてなdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing

Trackback URL

After Admin approves this comment, it will be shown.


Comments

Leave a Reply