Support for qtranslate-xt
Quote from george33 on July 8, 2020, 10:57 pmHi,
I have created forums in three languages and I use qtranslate-xt which is not dead as many people think. It is not simply updated on the wp platform but continues on github. It is widely used; just to mention that it has 100k installations according to wp stats and this concerns only the old versions. So I think it is worth adding support for it.
qtranslate-xt adds support for different plugins and I can ask support for asgaros; but they have a long todo list and this will take time; maybe one year, I suppose.
So I am asking if @asgaros has plans to do it.
So far the suggested solution to have a multilingual forum is by using categories; for ex. pages with shortcode like
[forum category="CATEGORYID1,CATEGORYID2"]
So, in my case, one has to create three pages with three shortcodes and they will have three different urls. I tested it and it is not convenient.For example:
-When I want to go from the english forum to the french forum and I click on the french flag I see a message “Sorry, this forum is only in french”. A normal user won’t know what to do after this message.
-There are common forums for all languages, e.g: the support forum for the site or the forum to welcome all users. If I want to send someone to a common forum, which link shall I use, given that users speak different languages?
-I want to put a link on the homepage pointing to the forums and it’s tricky; because it must be adapted to the user’s browser language.
-If qtranslate-xt decides to support asgaros later, what shall I do with all those topics which will have been referenced by google with my current slug method? There will be a lot of broken links.
I want to build something on a real solution. So I decided to use only one page, the page which is created by default with the shortcode [forum] and to have a unique slug method: mysite.com/forums
which becomes mysite.com/en/forums or mysite.com/fr/forums etc automatically by qtranslate-xt and is seo-friendly.
Of course, all categories and forums are listed on this single page and I use css to hide unwanted forums for each language. For ex.
html[lang="en-US"] #forum-category-18, html[lang="en-US"] #forum-3 {display:none}Given that there is no integration asgaros-qtranslate only basic terms are translatable: the topbar menu, the page title and the widget title. All the other terms for ex. last post, subscriptions, activity etc are in english. Asgaros cannot detect the page language.
Qtranslate-xt gives the possibility to translate terms by using css and filters. Css generally don’t work. Filters sometimes work and sometimes don’t and I add them externally (in functions.php) using this code:
function qtranslate_filter( $text ) { return __( $text ); } add_filter( '---plugin filter---', 'qtranslate_filter', 10, 1);
I have two questions:
1. Are you going to add support for qtranslate-xt?
2. Which filters should I use for the term translation? Of course, I will spend some time to search in asgaros files.
Thanks in advance!
Hi,
I have created forums in three languages and I use qtranslate-xt which is not dead as many people think. It is not simply updated on the wp platform but continues on github. It is widely used; just to mention that it has 100k installations according to wp stats and this concerns only the old versions. So I think it is worth adding support for it.
qtranslate-xt adds support for different plugins and I can ask support for asgaros; but they have a long todo list and this will take time; maybe one year, I suppose.
So I am asking if @asgaros has plans to do it.
So far the suggested solution to have a multilingual forum is by using categories; for ex. pages with shortcode like
[forum category="CATEGORYID1,CATEGORYID2"]
So, in my case, one has to create three pages with three shortcodes and they will have three different urls. I tested it and it is not convenient.For example:
-When I want to go from the english forum to the french forum and I click on the french flag I see a message “Sorry, this forum is only in french”. A normal user won’t know what to do after this message.
-There are common forums for all languages, e.g: the support forum for the site or the forum to welcome all users. If I want to send someone to a common forum, which link shall I use, given that users speak different languages?
-I want to put a link on the homepage pointing to the forums and it’s tricky; because it must be adapted to the user’s browser language.
-If qtranslate-xt decides to support asgaros later, what shall I do with all those topics which will have been referenced by google with my current slug method? There will be a lot of broken links.
I want to build something on a real solution. So I decided to use only one page, the page which is created by default with the shortcode [forum] and to have a unique slug method: mysite.com/forums
which becomes mysite.com/en/forums or mysite.com/fr/forums etc automatically by qtranslate-xt and is seo-friendly.
Of course, all categories and forums are listed on this single page and I use css to hide unwanted forums for each language. For ex.
html[lang="en-US"] #forum-category-18, html[lang="en-US"] #forum-3 {display:none}
Given that there is no integration asgaros-qtranslate only basic terms are translatable: the topbar menu, the page title and the widget title. All the other terms for ex. last post, subscriptions, activity etc are in english. Asgaros cannot detect the page language.
Qtranslate-xt gives the possibility to translate terms by using css and filters. Css generally don’t work. Filters sometimes work and sometimes don’t and I add them externally (in functions.php) using this code:
function qtranslate_filter( $text ) { return __( $text ); } add_filter( '---plugin filter---', 'qtranslate_filter', 10, 1);
I have two questions:
1. Are you going to add support for qtranslate-xt?
2. Which filters should I use for the term translation? Of course, I will spend some time to search in asgaros files.
Thanks in advance!
Quote from george33 on July 9, 2020, 7:22 amIs it possible to make Asgaros detect user’s language instead of the site’s language? Or add it probably as an optionĀ in the settings? This would be another way to create multilingual forums…
Is it possible to make Asgaros detect user’s language instead of the site’s language? Or add it probably as an optionĀ in the settings? This would be another way to create multilingual forums…
Quote from Asgaros on July 14, 2020, 3:37 amHello @george33
Asgaros Forum should already prioritize the user-language before the site-language. Also all strings are translateable. I think the main reason why they dont show up is because of missing translations. You can find the current translation-status here:
https://translate.wordpress.org/projects/wp-plugins/asgaros-forum/
Regarding the shortcodes: Does qTranslate provides shortcodes to show content for specific languages only? In that case you could use something like this:
[language=en]
[forum-shortcode-with-english-categories]
[/language]
[language=de]
[forum-shortcode-with-german-categories]
[/language
Hello @george33
Asgaros Forum should already prioritize the user-language before the site-language. Also all strings are translateable. I think the main reason why they dont show up is because of missing translations. You can find the current translation-status here:
https://translate.wordpress.org/projects/wp-plugins/asgaros-forum/
Regarding the shortcodes: Does qTranslate provides shortcodes to show content for specific languages only? In that case you could use something like this:
[language=en]
[forum-shortcode-with-english-categories]
[/language]
[language=de]
[forum-shortcode-with-german-categories]
[/language
Quote from george33 on July 17, 2020, 3:43 pmHi @asgaros and thank you for your response.
I removed qtranslate-xt temporarily because of some other problems and, at this moment, I cannot verify how it works. I will come back later if I still have a problem.
Also I was not aware of the method you suggest using these shortcodes.
Thanks again and have a nice day!
Hi @asgaros and thank you for your response.
I removed qtranslate-xt temporarily because of some other problems and, at this moment, I cannot verify how it works. I will come back later if I still have a problem.
Also I was not aware of the method you suggest using these shortcodes.
Thanks again and have a nice day!