説明

The plugin offers a way to maintain dynamic multilingual content on a WordPress site. While static localization is already excellently implemented and offered by WordPress framework through po/mo file framework, it is still impossible to maintain dynamic multilingual content without an additional specialized plugin, a kind of which qTranslate-X belongs to. For example, what if you need to make title, content and excerpt of a page to be multilingual? In theory, it could be handled by po/mo files, but in an insanely inconvenient way.

To deal with dynamic content, qTranslate-X provides language switching buttons on applicable admin editing pages, which, once pressed, make all the text of multilingual fields to be filled with the language chosen. The instant language change happens locally in your browser without sending an additional request to the server, which makes it most convenient for bi-lingual or few-lingual sites, for example, owners of which perform the translation of content on their own. qTranslate-X does not provide a way to translate static strings, assuming that this part is already implemented and handled by the WordPress localization framework.

The plugin provides a way to designate which fields on a page or post are to be multilingual. Once a field is declared multilingual, it will be distinguishably highlighted (in a customizable way) on admin side. At frontend, the value of active language, as defined by a page viewer, is extracted from multilingual field to be displayed within HTML context. Thus, a concept of multilingual field is in use here, as opposite to a concept of whole separate page or separate site for each language, as it is done in a number of other multilingual content management plugins, see, for example, free Polylang or paid WPML. Each plugin has its own pros and cons, please, choose carefully the one which suits your needs the best.

Plugin qTranslate-X provides a convenient way to describe which fields need to be multilingual through a JSON-encoded configuration file as described in Integration Guide. It makes it easy to integrate your theme or other plugins with qTranslate-X. A JSON-encoded file, named i18n-config.json, such as the one used by qTranslate-X itself, may be provided by themes and plugins within their distribution. Plugin qTranslate-X picks up and load those configuration files on activation of a plugin or on the switch of a theme. Such a configuration file can potentially be employed by any other multilingual plugin. The developers are encouraged to contact us to discuss a common standard for the i18n-config.json configuration file.

The plugin does not currently offer any kind of translation services. The team has conducted an online survey to find out how people translate their content. You are welcome to make your entry too. It appears so far, that translation service is not an immediate need. Administrators normally have their ways to translate the content, but they need a convenient way to enter translated content into an appropriate place, which this plugin is designed to help for. Translation services might still be provided in the future releases as a paid feature.

Plugin qTranslate-X makes creation of multilingual content as easy as working with a single language. Here are some features:

One-click local switching between the languages – Changing the language as easy as switching between Visual and HTML.

Comes with a number of languages already built-in – English, German, Simplified Chinese, for example, and many more.

Language customizations without changing the .po/mo files – It stores all the translations in the same post fields, while shows it to user for editing one by one depending on the language to edit chosen.

In-line syntax ‘[:en]English Text[:de]Deutsch[:]‘ or ‘<!--:en-->English Text<!--:--><!--:de-->Deutsch<!--:-->‘ for theme-custom fields gets them translated – See FAQ for more information.

If you encounter a conflicting plugin, please let us know, and meanwhile try to use other plugin of similar functionality, if possible.

This plugin has started as a descendant of qTranslate, which has apparently been abandoned by the original author, Qian Qin. At this point, qTranslate-X has many new features and hardly resembles its ancestor. Neither it is a straightforward compatible with older plugin. One will need to carefully read Migration Guide in order to switch a site from old qTranslate to qTranslate-X.

You may still find some useful information through reading qTranslate‘s original documentation, which is not duplicated here in full. There are also other plugins, which offer multilingual support, but it seems that Qian Qin has a very good original back-end design, and many people have been pleasantly using his plugin ever since. It stores all translations in the same single post, which makes it easy to maintain and to use it with other plugins. However, the user interface of former qTranslate got out of sync with the recent versions of WordPress, especially after WP went to TinyMCE 4. There is a number of forks of qTranslate, see for example, mqTranslate, qTranslate Plus and zTranslate. They all try to fix qTranslate’s user interface preserving its original back-end, which is what this plugin does too. This plugin is a hybrid of all of them and fixes a few bugs in each of them. It also has many new features too, like theme custom translatable fields, for example. We hope that this plugin is the most complete working version which combines the best features of qTranslate, mqTranslate, qTranslate Plus and zTranslate.

We organized an anonymous entity qTranslate Team to maintain a joint authority of all qTranslate-ish plugins. Anyone is welcome to join with a contribution. Participating plugin authors should share the support efforts for each other.

Credentials

Desirable Unimplemented Features

スクリーンショット

Editing screen showing the Language Switching Buttons (LSB). Pressing a button does not make a call to the server, the editing happens locally in browser, until "Update" button is pressed, the same way as it is for one language. Multilingual Fields (MLF) are decorated with a color bar on the left to make it easier to distinct them. The way MLF is marked is customizable. Note, that only the fields configured to be multilingual respond to LSB, while regular fields are not affected and keep the same value for each language.

インストール

Important: Read migration instructions, if you previously used other multilingual plugin, otherwise initial installation of this plugin is no different from any other standard plugin:

Very Important: Whenever you update the plugin, make sure to deactivate the previous version and then activate the new one. Normal WordPress update does that, and should be sufficient, but if you overwrote plugin files manually, be sure to execute deactivation/activation cycle, otherwise you will miss the execution of activation hooks and some options may become misconfigured. for For the sake of performance, plugin is not programmed to run all the necessary checks every time it is loaded, since activation hook is an expensive operation. That is why it is important to execute deactivation/activation cycle.

Otherwise the installation is similar to any other WordPress plugin:

Download the plugin from WordPress or take the latest development version from GitHub.

Use WordPress /wp-admin/plugin-install.php page to install a plugin or extract all the files and upload everything (keeping the directory structure) to the /wp-content/plugins/ directory.

Deactivate plugin qTranslate, mqTranslate, qTranslate Plus, zTranslate or any other multilingual plugin, if you are running any.

Activate qTranslate-X through the ‘Plugins’ (/wp-admin/plugins.php) configuration page in WordPress.

Open Settings->Languages configuration page and add/delete/disable any languages you need.

Developers: please drop new topics here, the text will be moved to qTranslate-X explained at the time of the next release.

Installation Instructions

Important: Read migration instructions, if you previously used other multilingual plugin, otherwise initial installation of this plugin is no different from any other standard plugin:

Very Important: Whenever you update the plugin, make sure to deactivate the previous version and then activate the new one. Normal WordPress update does that, and should be sufficient, but if you overwrote plugin files manually, be sure to execute deactivation/activation cycle, otherwise you will miss the execution of activation hooks and some options may become misconfigured. for For the sake of performance, plugin is not programmed to run all the necessary checks every time it is loaded, since activation hook is an expensive operation. That is why it is important to execute deactivation/activation cycle.

Otherwise the installation is similar to any other WordPress plugin:

Download the plugin from WordPress or take the latest development version from GitHub.

Use WordPress /wp-admin/plugin-install.php page to install a plugin or extract all the files and upload everything (keeping the directory structure) to the /wp-content/plugins/ directory.

Deactivate plugin qTranslate, mqTranslate, qTranslate Plus, zTranslate or any other multilingual plugin, if you are running any.

Activate qTranslate-X through the ‘Plugins’ (/wp-admin/plugins.php) configuration page in WordPress.

Open Settings->Languages configuration page and add/delete/disable any languages you need.

The plugin saves all languages in one post. So as soon as you turn off the plugin, you have all languages in your posts, separated by {en} or {es} tags. This makes it hard to migrate (although I saw a step by step instruction in the forum, but didn’t try it so far).

3.4.6.6

3.4.6.5

Improvement: Option ‘Show language names in “Camel Case”‘ has been added on Settings/Languages page /wp-admin/options-general.php?page=qtranslate-x#general in order to handle absence of function mb_convert_case, as PHP module mbstring may not be installed by default: WP Topic.

Fix: consistency of option “Hide Content …” to show single post without 404 error, like it is with single page: Issue #297.

Fix: Predefined locales are changed to match WordPress locales:
Estonian (Eesti) ‘et_EE’ renamed to ‘et’,
Basque (Euskera, in native alphabet, Euskara, in WordPress, both correct) eu_ES renamed to ‘eu’,
Greek (Ελληνικά) ‘el_GR’ renamed to ‘el’,
Finnish (Suomi) ‘fi_FI’ renamed to ‘fi’,
Croatian (Hrvatski) ‘hr_HR’ renamed to ‘hr’.
Old .mo files are kept in order not to break the sites that may be currently using them, but they should now switch the locale appropriately.
qtranslate-el_GR. renamed to qtranslate-el.
qtranslate-es_CA. renamed to qtranslate-ca.
qtranslate-hr_HR. renamed to qtranslate-hr.*
This emerged from Topic #27.

Fix: PHP7, Warning ‘Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP’: Issue #.

3.4.6.4 release

Enhancement: The list of avalable languages in “Not Available Message” and alternative language shown now follow the order of languges defined on configuration page, ignoring the default language. For example, if the first language in the order is English, the second is your native and the default, then English translation will be preferably shown as alternative language. Most sites are expected to be unaffected, since the first language in the order is normally the default langauge. However, it may make sense to first try to show most common language (like English in this example), instead of the default language. Now this is possible with putting the most common language to be the first in the order of languages. The order affects language menu, widget and language shown when translation is not available, as well as any other place where languages need to be listed in an order.

Fix: home_url() on admin side is now only filtered on /wp-admin/customize.php page, otherwise it created a few problems, for example, wrong overwriting of .htaccess file in some cases, causing Internal Server Error 500 with infinite redirection loop: WP Topic.

3.4.6.2 release

Fix: recovered translation of parent of a category on category edit page.

3.4.6.1 release

Fix: Call of qtranxf_get_admin_page_config is moved after all integrating plugins loaded their *-admin.php, otherwise i18n configuration is loaded only partially, which broke “Woocommerce & qTranslate-X”. Issue #277.

3.4.6 release

All issues after version 3.4.4

3.4.5.4

Feature: Type ‘custom’ with arbitrary format of items for widget “qTranslate Language Chooser”. Arguments of function qtranxf_generateLanguageSelectCodeare chenge to comply with WordPress standards. Compatibility with old arguments is preserved.

Enhancement: Translation of language names to other languages: Issue #264. Thanks to benique.

3.3.7

Feature: swirly-bracket(brace) language encoding added to be used in places where square-bracket and comment encoding do not work. ‘[:]’ sometimes conflict with shortcodes. ‘‘ does not survive tag clean up. ‘{:}'(swirly-bracket) seems to survive all.

3.3.3

Fix: hreflang in <link> is now locale instead of language code: WP Topic.

3.3.2

Feature: Meta-box ‘LSB’ for Language Switching Buttons, which can be placed anywhere on a page (not finished, just to test an idea on how it will look and work).

Feature: integration framework is finished in its first version as it is described in Integration Guide. The configuration is now loadable from JSON files, which 3rd-party themes or plugins may generate.

Enhancement: pre-sets for option ‘Highlight Style’ are changed to use CSS property ‘border’ instead of ‘box-shadow’ and ‘outline’, otherwise the highlighting was not always visible, specifically when class ‘widefat’ is also in use.

3.2.9.9.3 alpha

Translation: German (de_DE) po/mo files updated. Thanks to Robert Skiba.

Enhancement: another attempt to check REDIRECT_STATUS in function qtranxf_can_redirect to prevent unnecessary redirection if mod_rewrite is already doing redirection. In particular, this should help to troubleshoot internal server error as it was observed in Issue #96.

3.2.9.8.9 alpha

Enhancement (cancelled previously changed at 3.2.9.8.8, it breaks some other places, needs more investigation): added check isset($_SERVER['REDIRECT_STATUS']) in function qtranxf_can_redirect to prevent another redirection if mod_rewrite is already doing redirection. In particular, this should help to troubleshoot internal server error 500 as it was observed in Issue #96.

3.2.9.8.8 alpha

Enhancement: added check isset($_SERVER['REDIRECT_STATUS']) in function qtranxf_can_redirect to prevent another redirection if mod_rewrite is already doing redirection. In particular, this should help to troubleshoot internal server error 500 as it was observed in Issue #96.

Feature: js functions addLanguageSwitchBeforeListener and addLanguageSwitchAfterListener is designed for other plugin integration, read Integration for more information. Thanks to Dmitry for the useful design discussion Issue #128.