Pular a navegação
63

The vast majority of WordPress sites today are non-English sites. Today, WPML makes it easier to run multilingual sites, which don’t have English as their default language, or don’t have English at all.

Why English  is  was a special language in your multilingual sites?

WPML’s String Translation gets texts from different sources. Most importantly, it get strings from GetText functions (WordPress, the theme and plugins) and from texts that you enter in different places in the WordPress admin.

Almost everything that comes from GetText will be originally in English. You want to enter texts in the WordPress admin in the site’s default language.

The problem, until now, was that the String Translation had only ONE source language setting. Then, we even removed that because setting it to not English created mountains of problems.

Now, source language for strings is making a big comeback. Each string has its own source language and you can easily set the language of individual strings, or entire contexts.

Let’s look at a practical example. Supposing that your site runs in Spanish (default), Catalan and French. No English. Your theme and plugins are coded with English, as their original language.

In this example, you will want to translate the texts in the theme from English to Spanish, Catalan and French. You will want to enter the site’s tagline and widgets in Spanish and translate them to Catalan and French. You certainly don’t want to go through English.

Enter texts in your normal language Translate to the site’s other languages in String Translation
Site name and tagline in Spanish, in the WordPress Settings admin screen
We can translate the tagline from Spanish to the other languages in the site
The Spanish homepage (original language) The French homepage (translation)
‘Original’ Spanish on the homepage
French translation on the French homepage

With this update to WPML, you can do just this. WPML assumes that any texts coming from WordPress, the theme or plugins is in English. Even if your site doesn’t have English, you will still see English as the source language of these strings and you can translate to all of your site’s languages.

WPML will also assume that any texts that you enter in the WordPress admin will be in the site’s default language. You will be able to translate these texts to the other languages in the site, without going through English.

How to set the source languages of strings

You can change the languages of specific strings or all strings that belong to a domain.

To change the language of specific strings, select them and click on the new Change language of selected strings button. Then, select the new language.

Change the language of selected strings

You can also change the language of entire contexts. This is useful when you get a theme or a plugin, that’s coded in a language other than English. Click on the new link, at the top of the String Translation page, Language of domains.

Click on the link to ‘Languages of domains’

Then, choose the new language.

Dialog for setting the language of entire domains

The dialog will show you a table of the strings in that domain. You can choose the new language and also make it the default language for new strings that will be added to that domain.

Existing sites remain unchanged (unless you want to change strings)

Existing sites are not affected by this change. Since you HAD to write texts in English before in the WordPress admin, when you update to the new version of WPML, WPML will know that existing admin strings are in English. If you want, you can now change their language and enter them again in your site’s default language. However, this change is entirely up to you. If you don’t want to go through the hassle, you don’t have to.

To update the string languages of existing sites, follow the same as shown before. You can update individual strings or entire contexts.

Known issues

This beta version isn’t yet working completely smoothly with Gravity Forms and with our Layouts plugin (packages translation). There may also be a few minor performance issues.

Every known issue will be resolved by the time this version goes to production. We recommend to skip your testing now with this beta version and Gravity Forms and Toolset plugins, as we are working on known issues.

Download the beta

This version of WPML is currently in beta. It’s been a huge change in WPML core and the String Translation and it’s not ready for production sites yet. We are inviting you to try this beta on your development sites. We’re run a lot of tests, but we can’t cover all combinations of themes and plugins. Before this version moves to production, we are asking your help to test with your development sites. If you are running a site that has a default language other than English, this update is very much for you. Download the beta and try it.

To download, go to your WPML account. Click on Downloads and scroll all the way to the bottom. Download the CMS Beta Package. This ZIP file includes all of WPML’s components. You need to use the WPML components from this ZIP only and not mix development versions with production versions.

If you are using WooCommerce Multilingual, use the beta from that package too. The WooCommerce Multilingual beta is updated for this change in string languages.

Feedback?

With this update to WPML, String Translation should become a lot easier for you. Please tell us about anything that doesn’t make sense or requires complex setup. We tried to set the best defaults, so that you can just ‘translate’, without having to go through language definitions. If we missed anything, tell us.

To report problems, best to create a thread in our support forum. You can follow up with a comment here, so that we can see all related threads (and handle them).

Questions? Suggestions? Ideas? Leave your comments and we’ll get back to you.