Qtranslate X: Show selector only if you have translated content - php

I don't want to use the normal Lang switcher, I just want to let the user know if that content is available in other languages.
Example: You are reading a page in English, and at the end of the article, something like: This article is also available in German and French.
I tried this one but didn't work - Wordpress - Qtranslate to show only available languages
Any ideas?
Thanks!

Related

How to resolve the WPML translation issue on website?

I have one site in WordPress + DIVI + WooCommerce + WPML and other plugins.
I am facing one issue on site while WPML Translation.
Website is in 3 languages:
Dutch (Main)
Franch
English
I need to keep different string for different language for the button text in one module of the DIVI.
I selected English language from adminbar
When I go to Theme Builder -> Global Header and I change the button text to "XYZ", it is reflecting only on English page, that is fine.
Now when I change the language to Dutch
and When I go to Theme Builder -> Global Header and I change the button text to "ABC", then it is reflecting on Dutch and French pages (English page is fine with "XYZ"), this must reflect on Dutch page only If I change the button by selecting the Dutch language
Now when I change the language to French
and When I go to Theme Builder -> Global Header and I change the button text to "DEF", then it is reflecting on Dutch and French pages (English page is fine with "XYZ"), this must reflect on French page only If I change the button by selecting the French language
I checked for String Translation, and updated translation for Dutch and French but it is not reflecting on front side.
When you're switching languages and modifying it manually like this, you are messing up the WPML logic that's handling translations. Page builders are tricky to translate. That's why you need to follow the recommended process.
From documentation:
To translate the Divi site header or footer you created using the Divi
Theme Builder, follow these steps:
Go to WPML > Translation Management. Choose Header Layout, Footer Layout, or Body Layout from the Type dropdown, then click the Filter
button.
Choose which headers or footers you want to translate, the languages you want to translate them into, and click Translate
selected content.
Go to WPML > Translations to take and translate the global header using the Advanced Translation Editor.
Try this with a fresh site with a new global Divi header/footer from scratch.

WordPress WPML - Language code exists

i have a wordpress site with WPML. In my site I have English and Russian setup, And now i want to add Spanish. I try to add the Spanish language like this:
But i got the error: Language code exists.
How can I install a language that "already exists"?
Thanks :)
The Spanish language is natively supported by WPML so you don't have to add it manually like you are doing now. Under "WPML" -> "Languages" you can click on a button "Add languages" and just check the checkbox voor Spanish.

Fails to change the language of a WP site

I'm building a WP site for a Spanish company, and I want to change the language of the site (not the admin area's language).
All the posts and the things that I put in the site are in Spanish, since I created them, but the default texts of the theme are in English (for instance, the string "search" inside the search box).
When I'm trying to change the language through Settings -> General -> Site language to "Español", it changes. But after I refresh the page it returns to "en_US" again, and in the bottom it says:
Note: The WPLANG constant in your wp-config.php file is no longer needed.
I did change the WPLANG in wp-confing.php to define('WPLANG','es_ES'), doesn't seem to help.
I am not sure if you have put the language files in the right place.
So, first you need to download spanish language files, you can find here
and then put them into /wp-content/langauges folder, if no, create it.
you can find full tutorial here
First, you have to download spanish version.
All files of wordpress system will translate to Spanish, BUT, some words of your current theme installed maybe are in english, you'll translate it.
In search.php you will find the input box, where you will change the word "Search.." this are in Apparence (Apariencia) -> Editor (Editor)
First, make sure the theme you are using is multi-language.
If no:
You need to translate the theme files located in wp-content/themes/
-EDIT:
You need to download the correct theme to your computer and manually edit the files within the theme folder, then upload it again.
Basically just go trough the theme code and replace the english text you see, for example "next post"/"previous post" to the correct sentence in Spanish in your case.
Just make sure to not edit anything you don't understand :)
Give me a shout if you need more help :)

Magento URL translation for CMS pages names

I build the store with 2 views for two languages French and English and I have many CMS pages, like "about us" in English and the same page in French - "a propos".
In administration side the option "Add Store Code to Urls" is ON.
I have created 2 CMS pages "about-us" linked to English store view and another one "a-propos" linked to French store view.
When I’m in English store on "About us" page the URL is www.myurl.com/en/about-us/ but if I switch the language to French the language switcher brings me to www.myurl.com/fr/about-us/ instead of www.myurl.com/fr/a-propos/
So, the language switcher changes only the store code but not the page name.
Thank you,
Yes, this is how magento works. If you want to change to another static block on your about page in some language you have to change the reference to the block id "about-us" to "a-propos" on the french site.
This page explains this quite good I think.
http://anothermarketer.com/how-to-translate-a-magento-theme/
Just add a comment to my answer if you need more help.

Drupal language navigation

I want to show the language navigation icon on the header of my side. I use locale, i18 and content type translation. I am not interested to use module for language icon, I just want the link of the corresponding node and available languages. How can I achieve this? I am using Drupal 6
If you use the module for the language icons, you will notice that when you are in a certain node, and you press on a different language, you will jump to the same node but in the other language.
In other words, you should change the language switcher from flags to whatever you want..

Categories