Jupiter supports the WPML plugin fully but you need to consider one very important point when setting it up on your site. When you activate the WPML plugin, you need to go to Settings > General and check or uncheck the Unify Theme Options settings then Save Changes.
If the mentioned setting is checked, you will have a Single Theme Options for all languages otherwise you will have a Separate Theme Options for each language.
Separate Theme Options in Setup WPML
We coded our theme to give WPML users the freedom to have separate sets of options for each language. To set the Theme Options for each language, please follow the steps below:
- Keep WPML deactivated
- Go to Theme Options > Advanced > Export Options
- Copy the code to a text file for future reference
- Activate WPML
- Select a specific language
- Go to Theme Options > Advanced > Import Options
- Paste the code from your text file which you have from step 3
- Save the settings.
Please Repeat Steps 5-8 for All Languages that You Have.
This will ensure that you have the same settings for each of your languages. For future reference, if you want all of your languages to have the same settings, you will need to change every language separately whenever you make a change in Theme Options. However, you can also have a different set of Theme Options for each of your languages.
Single Theme Options in Setup WPML (Above Jupiter 5.1)
To set the same single Theme Options for all languages, you need to add the line of code detailed below to the functions.php file of your Child Theme.
If there is no functions.php file, you need to create an empty file and add the opening PHP tag.
This line of code will unify all the Theme Options.
define('WPML_UNIFY_THEME_OPTIONS', true);
Single Theme Options in setup WPML (Below Jupiter 5.1)
To set the same single Theme Options for all languages, you need to modify the line of code detailed below in the functions.php file of your Theme.
if (defined("ICL_LANGUAGE_CODE")) {
$lang = "_" . ICL_LANGUAGE_CODE;
} else {
$lang = "";
}
define("THEME_OPTIONS", $options["theme_name"] . '_options' . $lang);
[abb_step title="Change it to:" number="3"]
/*if (defined("ICL_LANGUAGE_CODE")) {
$lang = "_" . ICL_LANGUAGE_CODE;
} else {
$lang = "";
}*/
define("THEME_OPTIONS", $options["theme_name"] . '_options');
What Now?
For more information about usage of the WPML plugin please read their documentation. Also you are welcome to read this article to find out how to translate theme related text.