qtranslate

How to enter a static methods for Qt Linguist QTranslator

佐手、 提交于 2019-12-08 10:50:27
问题 I have a Qt Linguist *.ts file like: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="de_DE" sourcelanguage="en_GB"> <context> <name></name> <message> <location filename="classWithStaticMethod.cpp" line="60"/> <source>File</source> <translation>Datei</translation> </message> </context> </TS> How do I enter a translation object with a static method. ClassWithStaticMethod.cpp has a static method where a QT_TR_NOOP("File") occurs at line 60 for instance. Leaving

Ajax + qtranslate

戏子无情 提交于 2019-12-07 14:04:57
问题 Hi I ran into the same problem as Rik had here The answer given was that he had to "Search in code for link request "ajax.php". Replace "ajax.php" with ajax.php/?lang='.qtrans_getLanguage()" " My question is this (I know it might sound stupid, I suck at this stuff), what code does this answer refer to and where do I find it? I've searched all php files in the qtranslate and ajax plugins but cannot find where it is. 回答1: It depends on which WP ajax-plugin you have a problem with. In case

qTranslate for Wordpress doesn't automatic give me the correct language

时光怂恿深爱的人放手 提交于 2019-12-07 03:14:46
问题 I use qTranslate for Wordpress to have my blog posts in English, Swedish and German. I have activated the "Detect Browser Language" so that the visitor will be forwarded to the correct URL for the language specified by his browser. So if I visit blog.domain.com I get transfered to blog.domain.com/sv/ and my blog posts is in Swedish, that is great! But now to the problem, if I visit blog.domain.com again a second time from the same computer I don't get transfered and the blog post is in

(Wordpress) How can i get the full content of a post with the html tags - unstripped

随声附和 提交于 2019-12-06 15:13:39
问题 I'm using WordPress for my site with the qtranslate plugin and i'm trying to display language flags in each post. Qtranslate inserts html tags to the content and title like "!--:en-->" for each language that i used in each post So i need a conditional that checks which of these html tags are included in the content so i can print the specific flags something like this: function language_pick(){ $qt_dir = "http://localhost/MY-SITE/wp-content/plugins/qtranslate-xp/flags/"; $cr_url = "http://".$

Simple Regular Expression to return text from Wordpress title - qtranslate plugin

三世轮回 提交于 2019-12-06 02:15:31
I am using qtranslate wordpress plugin to store blog content in multiple languages. Now I need to extract content from qtranslate tags. $post_title = "<!--:en-->English text<!--:--><!--:it-->Italian text<!--:-->"; What would be the php code & regular expression to return text and language from this string? Thanks a lot! Try something like: <?php $post_title = "<!--:en-->English text<!--:--><!--:it-->Italian text<!--:-->"; $regexp = '/<\!--:(\w+?)-->([^<]+?)<\!--:-->/i'; if(preg_match_all($regexp, $post_title, $matches)) { $titles = array(); $count = count($matches[0]); for($i = 0; $i < $count;

Ajax + qtranslate

Deadly 提交于 2019-12-06 02:06:43
Hi I ran into the same problem as Rik had here The answer given was that he had to "Search in code for link request "ajax.php". Replace "ajax.php" with ajax.php/?lang='.qtrans_getLanguage()" " My question is this (I know it might sound stupid, I suck at this stuff), what code does this answer refer to and where do I find it? I've searched all php files in the qtranslate and ajax plugins but cannot find where it is. It depends on which WP ajax-plugin you have a problem with. In case "Category-Post AJAX Tree" I had to replace $localize = array ('ajaxurl' => admin_url('admin-ajax.php'), with

How can I translate my navigation menu's LINKS with qtranslate on wordpress?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 15:04:23
问题 I have a bilingual (english/arabic) wordpress site. I was able to successfully translate the navigation menu items. However, the menu links on the arabic site, link to the default language which is English. How can I tell wordpress that I need the menu links to change on the arabic site (I need the links on the arabic site to include /ar, for example: www.talalonline.com/ar instead of www.talalonline.com) thanks 回答1: @maha, I searched a lot about this and found the solution here, but the

qtranslate plugin and ajax requests

為{幸葍}努か 提交于 2019-12-02 03:49:37
问题 I'm trying to obtain the correct content for each language (I'm using qtranslate plugin in Wordpress environment) loaded by Ajax calls. Every time, contents are shown up only in the default language. I'm thinking about to pass the default-language-qtranslate variable into the ajax calls but I don't know how. Maybe someone out here has already solved this issue..? Thanks guys 回答1: This will help you to fix the default language request in Mailpress, or any other plugin. Search in code for link