Which factor decides the language to be displayed? - wordpress

I am developing a CMS based on wordpress multi-site approach. So far i have 5 languages and i have created a site for each language.
Idea is when a user go to
www.mydomian.com/uk - displays English version.
www.mydomian.com/es - displays Spanish version.
www.mydomian.com/fr - displays French version.
Now I have reached localisation of my theme. As mentioned in theme developer handbook, i am aware of theme localisation functions and other options in wordpress. But i am confused, how would I inform my theme to load translations based on site which user is selected. for eg. if user is browsing www.mydomian.com/es theme should load all spanish translations.
Please let us know the best options for this.

Every site you add in WordPress multi-site has its own "Site Language" setting, so you don't need to set the locale from your URL pattern. The correct theme translations will be loaded automatically for each site just based on its settings.
If you didn't set the language when you added each site then go into each site's settings and change the field labelled "WPLANG" to "es_ES" and "fr_FR" respectively.
The site settings are found under My Sites > Network Admin > Sites then click edit under the site you want, and then select the "Settings" tab.
Or jump to: wp-admin/network/site-settings.php?id=<siteId> if you know the site ID number.
The site settings screen for multi-site isn't as user friendly as the standalone settings page. There is no dropdown menu for the available languages, so be sure to enter the locale code correctly.
It doesn't matter what you've chosen as your multi-site subdirectory or subdomain patterns just note that the codes you're using in your example are not the official WordPress locale codes.
Spanish is es_ES (not es)
French is fr_FR (not fr):
British English is en_GB (not uk)

Related

web set a homepage from an external link

I created a blog in wordpress in French translated into English with the gtranslate plugin, now I want the default home page to be in English how can I force this redirect,
I thought of the htacces file but I don't I don't really know, I've found nothing

How to change Default Wordpress language?

Hello guys I use a WordPress theme it's by default English I want to change it to French when I change it on Wp-Admin only admin interface is changed not the Website
I used some translation plugins like G translate and they give me a multi-language Website but I want the user to see my website in french by default Can anyone helps me please !!!!!
if your Dashboard is in French now but your Front end in English that means that your theme doesn't support Localization or it just doesn't have the files for your selected language.
You can try Loco translate (free plugin from WordPress plugins directory) to check if you can translate the theme output. Mind that Loco translate (and any other of that kind) will work only if your theme supports Localization.
I am not related in any way with Loco translate
https://wordpress.org/plugins/loco-translate/

Redirecting Site Root URL to its Language Root Folder

Environment: Plone 4.3.4.1 , plone.app.multilingual 2.0.0 (from github)
I have two Plone sites, both with p.a.m enabled, but they behavior differently when visiting to their site root URL. Say, visit http://www.site1.com/ will redirect to http://www.site1.com/zh , that is what I need. But http://www.site2.com/ will show its item listing, that I want it redirect to http://www.site2.com/zh. See the below picture for reference.
How do I enable the auto-redirection to one of its Language Root Folder? Hints are appreciated.
Edit After the Comment and Answer:
Ulrich and Mathias are right for the hints. Here are some more details. First, when I select "Chinese" as my default site language, there is no "Root language switcher" under "Display" menu.
When I select "English" as my default site language, then I can see and select "Root language switcher" under "Display" menu. Everything works as expected.
It's like Ulrich mentioned, you can define the language-switcher View as default view on the plone root. This automatically redirects you to the desired language folder.
More Infos: https://github.com/plone/plone.app.multilingual/blob/2.x/src/plone/app/multilingual/browser/switcher.py
If you setup the a multilingual site, the default page of the plone root should be configured correctly: Check LanguageSetup: https://github.com/plone/plone.app.multilingual/blob/2.x/src/plone/app/multilingual/browser/setup.py#L245

How can I add translations to a Plone site front-page

I'm using LinguaPlone in a site thas is written in English and Spanish. All site pages and folders can be translated, except the front page folder. I think that I can translate the page that the front page folder uses as view, but in that case when a user goes to front page, only the folder view is showed (not its translation).
I'm using Plone 4.1.4 and LinguaPlone 4.1.2. Maybe I need to try with other tool, as raptus.multilingualplone.
Normally, when setting up a LinguaPlone site you let LinguaPlone create top-level per-language folders that act as navigation roots. The root of the site itself is set up to redirect visitors to one of these roots depending on their language preferences and other factors, using a language selector.
Take a look at http://www.norden.org/ for an example of such a site. Notice that when you visit that URL you are automatically redirected to one of the supported languages, usually to http://www.norden.org/en/ for english. You can switch between the available languages on the top left, and you'll see that the first element of the URL changes between the language codes. Those are the top-level folders.
The advantage here is that each of these folders can have it's own default view. Another is that URLs are always crystal clear for visitors; switch from "About this website" (http://www.norden.org/en/about-this-website) to the Norwegian translation and you end up on on http://www.norden.org/no/om-nettstedet; anyone can see that the new URL is in the Norwegian language even if they do not understand that language.
You can set up these language folders after the fact, as documented in the LinguaPlone installation instructions; simply visit the URL:
http://localhost:8080/Plone/##language-setup-folders
but be sure to backup your site first and to adjust the address for your local situation.

Multi-lingual interface in Drupal (without domain prefixes or suffixes)

My intention was to enable multi-lingual interface only for drupal built-in interface ("my account", "administration", nodes, commenting and so on) without any additional prefixes, which relies only on user language preferences. But it just doesn't work.
Following this tutorial, I did this:
I installed 'internationalization', 'locate', 'translation' modules
I added the secondary language in settings
I have downloaded and put the translation files into drupal directory
It works when I use with prefix and does not work when with "None" setting.
Thanks for your help in advance.
It is unclear what do you want to do. If you want the multilingual system work without prefixes you should go to Home › Administer › Site configuration › Languages > Configure > Language negotiation and choose 'none' - the default language is used for site presentation, though users may (optionally) select a preferred language on the My Account page.

Resources