Dear Qian,
Few days ago, I started a work on creating my personal multilingual blog based on
Wordpress and I have tried several plugins providing multilingual functionality.
Unfortunately, it turned out that neither of them satisfies my needs exactly.
Your plugin, qTranslate, is the closest to meet my requirements which
at first seemed to me to be quite natural and common.
Therefore, I am writing to you with few proposals regarding the upcoming 3.0
release. In my opinion, they would be easy to implement.
I would like to know what do you think about it.
First, let me explain what I am trying to do...
I need to create a blog supporting two languages, English (the default language) and Polish.
Of course, this is just an example, and it can be generalized to other and more languages.
Some of my blog posts and pages will have two language versions, but some of
them, only one language version. If a visitor prefers Polish (e.g. according to
the request send by his or her browser etc.), the site should be displayed in
this language. However, if some post or page is available in English only,
I would like that default version to be displayed.
In other words, for some posts and pages, I would like to do an unobstructive
fallback to the language in which the translation is available.
Possibly, with an additional information "(Sorry, this content is available
in English only)", above the post/page body.
This behaviour seems to be very natural for me; the visitor is able to see all
blog contents, either in his native language, or partially in the default/common
language (e.g. English), if it is the only available translation.
It seems that the described behaviour is desired by many Wordpress users.
I came across many questions related to this issue on the Internet, but no out-of-the-box solutions.
For example, several discussions on WPML forum (WPML also does not support this directly yet):
http://forum.wpml.org/topic.php?id=2092 http://forum.wpml.org/topic.php?id=1257 http://forum.wpml.org/topic.php?id=1703To get such result, I tried to uncheck the option "Hide Content which is not
available for the selected language" in qTranslate Configuration. However, only
the messages "Sorry, this entry is only available in English." are
displayed then, instead of the only available translation contents.
Also, I do not want any language prefixes such as '(English) ' in the
posts/pages titles. I think that there should be an option to configure such
language prefix as a format string in qTranslate advanced settings,
e.g.: untranslated content prefix: '(%LANG) %text' or '' (no prefix).
Possibly, it would allow then even something like '%text <img src="/img/%LANG-flag.png"/>'.
Let me summarize my proposals now. I think that there should be a possibility
to configure the behaviour of qTranslate more flexible if some translation is
missing; Instead of the checkbox "Hide Untranslated Content", there should be
options for handling untranslated content:
1) Hide untranslated content (supported currently)
2) Show a message about available translations (supported currently)
and possibly also:
3) Fallback to the default language only
4) Fallback to the language of the highest priority/order available.
Let me explain it on the example of my blog.
In option 3, English visitors would see only English contents;
Polish visitors would see Polish translations or English version of the posts that
do not have a Polish translation.
In option 4, English visitors would see English posts or Polish
versions of the posts which do not have English translation;
Similarly, Polish visitors would see Polish version of the posts or English
version of the posts that do not have Polish translation.
Possibly, for options 3 and 4, also a checkbox "Show a message about available
translations (This entry is only available in ...)".
Currently, I have tweaked the source code of qTranslate a little bit to get
the expected behaviour on my blog. It is very simple, and I can provide you my
patch which allows to achieve the described functionality.
What do you think, could you implement some of those proposals?
Please let me know, if something needs a better explanation.
If you decided to take my proposals into account, I could be a tester of the 3.0 release.
This way I could avoid inconvenience with patching the source code after each
upgrade of your great plugin. Also, I hope that my proposals would make your
plugin even more robust and flexible in the upcoming 3.0 release.
I am looking forward to your response.
With Kind Regards,
Robert Nowotniak.