Polylang - Getting Started: Requirements
Polylang - Getting Started: Requirements
REQUIREMENTS
You must use at least WordPress 3.8. As for WordPress itself, your server must run
PHP5.2.4 and MySQL 5.
If you tried other multilingual plugins, deactivate them before activating Polylang.
1 – CREATING LANGUAGES
❶
❷ If your language is not available in the
predefined list, you can create it yourself by filling the
relevant fields. The full name is the language name as
❷ it will be displayed.
❺
❺ Polylang informs the theme it has to load the LTR
or RTL style. Note that not all themes are compatible
with both text directions.
❻ ❼
❻ Strings translation: Polylang allows translating user defined strings such as the
site title, the tagline, and the widget titles. Moreover themes and plugins can allow
you to translate their options here.
The translation of themes and or plugins are managed with the po/mo files that you
can handle with CodeStyling Localization plugin.
❶ Thanks to these input fields you can translate the string in all defined languages.
❷ Here you can also choose a different date format and time format per language.
See: http://codex.wordpress.org/Formatting_Date_and_Time
3 – POLYLANG SETTINGS
❶
❷
❶ Default language: it will for example be used when someone visits your
homepage for the first time.
❷ Check this option to set up the default language for all existing posts, pages,
categories and tags. This option is removed once a language is assigned to all the
content.
❸
❹
❺
❻
❸ The URL is not modified: whether Polylang is activated or not, the URL stays the
same for posts, pages, categories and post tags. The URL for date and author archives
are modified to include the language code.
❹ This option is checked by default and you should keep it as is, unless you know
what you are doing. For a site in English and in French, your post URLs would look like:
• http://www.yoursite.com/en/my-post/
• http://www.yoursite.com/fr/mon-article/
❺❻ For advanced users, if you want to use subdomains (or a different domain per
language), all your subdomains (or domains) must point to the same directory (where
the WordPress index.php is present).
Note that, except with the first option which keeps as much URLs as possible, when
Polylang is de-activated, every URL loose the language information and thus all
external links are broken.
❼ This option allows you to hide the language information only for the default
language. In this case the monthly archives URL in the default language will look
like: http://www.yoursite.com/2015/03/
❽ Here you can choose to include the keyword « language » in your urls.
Keep /language/ in pretty permalinks: the monthly archives URL will look like:
• http://www.yoursite.com/language/en/2015/03/
Remove /language/ in pretty permalinks: the monthly archives URL will look like:
• http://www.yoursite.com/en/2015/03/
❾
⓫ Check these options and a modification will impact all translations. You can safely
keep all these options unchecked.
4 – CREATING MENUS
❹
❸
❶
❶ You have to create one menu per language and save them. Then the 'Manage
Locations' tab appears.
Note that the language switcher will display a language only if at least one post or one
page has been published in this language.
5 – CREATING WIDGETS
Whatever the chosen options, the widget will display a language only if at least one
post or one page has been published in this language.
❶
❷
❸
❹
❺
❶ Here I requested the widget to display the language names and the flags.
❷ The widget will always send the visitor to the front page in the right language,
otherwise it will try to find the translated page (and link to the front page if none was
found).
It is very important to set the language for all existing posts, pages, categories and
tags otherwise they won’t be displayed.
i.e : Let's create your Static Home Page in 4 languages in Pages > Add New >
❷
❸
❹
❹ The means that the translation is done. Clicking on the icon allows you to edit the
translation.
The operation for posts, custom post types, categories and tags is exactly
the same.
Below is how your Home Page are displayed in the Page list table :
❻
❼
❺ The means that this page is in this language. You can edit it by click on the .
❻ The means that the translation is done. You can edit it by click on the .
❽❾ You can filter the content by language (posts, pages, media, categories, tags,
comments, string translations). This choice is persistent (kept even when you log out)
and also impacts the default language when creating a new content. It has no
influence on the language of the user admin interface, which can be chosen in the
user profile.
❾
❷ Then choose one of the page you have just created (the language doesn't
matter). This “Front page” option gives you the access to the option ❸ in Settings >
Languages > URL modifications :
❸
❹
• http://www.yoursite.com/en/
And this one does not exist anymore (it will send an Error 404):
• http://www.yoursite.com/en/home-in-english/