Does anyone have a clue, how to modify behaviour of django-cms language chooser, wich always shows whole list of languages even if certain page don't have translation for some of language/s?
I want to hide unavailable translations on current page, and show only translated variants, but can't find any information about this in django-cms documentation or internet. Is there any filters for language chooser tag?
You could use the same strategy as described in How to link to language's homepage for untranslated page in django-cms?
Instead of redirecting to the homepage, you would just not show that language.
Related
I'm using Polylang to support multiple languages on my site. Right now, if I'm on a post that say is in English and if I click a flag for which it has no translation (e.g. French), then I get taken to the home page in French. I don't want that. I want to stay on the current post (or better yet, be shown the post in the default polylang language) and not taken to the home page.
I've looked into setting a language attribute 'lang' => pll_default_language() in code somewhere, but I'm not really sure where to put it nor certain it would prevent the improper navigation to the home page. Does anyone know how to achieve this?
I am currently using the Multisite Language Switcher Plugin on one of our webpages. I am trying to create a language switch button that will allow the user to go to the same post of the other language when they click on it.
So for example, if we have the english post and its equivalent in the welsh language, I would need to get the URL of its counterpart for the user to go to that page.
Any help would be appreciated.
Configure Multisite Language Switcher Options first then add switcher button from elements to anywhere you'd like to display.
Well after 5 days of trying to find solution, I think I need WordPress magician to help me solve this.
I am translating my WordPress site. So far I have translated over 80% of the content mainly accessing .po files via server or by using LocoTranslate
I have troubles with translating some specific content on the page:
When accessing Products section in WordPress Dashboard I can see that even the settings are translated (to Danish) but some content of the same product page are not.
Image Of PRODUCT page:
What I have tried so far:
Checked all In Stock strings via LocoTranslate plugin (for main theme po file and plugins file) and all are translated to Danish.
I changed Main language in General WP Settings
Tried TranslatePress plugin, and when accessing the page via it, it does not offer an option to translate In Stock part. Evan tough it offers an option to translate action button and I did that.
As I can see on the editing page In Stock is clearly part:
Product settings on Dashboard
This means "In Stock" and even here is translated, too.
Note: When refreshing the page the translation is seen for a part of a second for the BUTTON, then it changes back to English.
Well, I am desperate. Can someone offer some other solution how I can fix this?
I have wordpress website with loco translate and two languages russian and ukrainian.
First russian language was created and later added ukrainian, therefore russian language loading by default when you visit the page. I want the main page to load in Ukrainian by default.
That is,
main.com/index.php is the Russian version, but you need to change it to
main.com/uk/main-ua
What i tryied ?
I did a redirect, but then the Ukrainian version is always loaded and it is impossible to change the language.
In the site settings, I set the default site language to Ukrainian, but this had no effect, as it was loaded in Russian and loaded.
I put in wp_config line define('WP_HOME', 'main.com/uk/main-ua') but it has no effect, russian version main.com/index.php is loaded anyway.
In the database, in the table wp_options, i changed the corresponding settings, the links in the menu changed to the "ukr" version, but the text of the links was not there, and the content of the main page remained "russians".
I'm confused now how to did it correctly. Who did this, give advice. Thanks.
Finally i found answer. There was mess in the polylang posts and the translations
some translations was not assigned to posts. So check if your post have translations first then go to "Languages" tab in admin panel and click on the star in the languages list.
I'm looking for a simple plugin for WordPress to be able to switch the language on the front-end.
I tried many plugins no one worked. I just need to prefix my page path with something like /en/my_page and transform it to /fr/my_page when I select French as the current language for instance.
I also have spent in the past quite a lot of time looking for a plugin to create sites in various languages.
The only plugin I would recommend is Qtranslate https://wordpress.org/plugins/qtranslate/
Its very simple, and easy to customize the front-end template using shortcodes.
I have developed a free plugin for that purpose here:
https://code.recuweb.com/get/language-switcher/
It has been reviewed and hosted by Wordpress here:
https://wordpress.org/plugins/language-switcher/
Language Switcher allows you to map urls of alternative languages for Post Types and Taxonomies. Additionally it allows you to filter archive pages by language.
To prefix your pages with the language code I recommend you to follow these steps:
create a main page with slug en and another one with slug fr.
set my_page with parent page en and ma_page with parent page fr.
map the urls of the translations in my_page and ma_page
add the shortcode [language-switcher] to allow readers to jump from one page to another