Language Switcher Plugin

Once the plugin has been activated, a new submenu Language Switcher will be displayed underneath the Options tab. This submenu can be used to choose the languages that will be used en the blog as well as its default language.

install5

The installation selects English and Spanish by default. To add a new language, please follow the steps below:

  1. Go to the administration section and enter the code of the new language, the image to be displayed (which are available in the plugins main directory), the date and time layouts and the text to be displayed when a translation of a blog entry is not available.
  2. Once the new language has been added, you will need to add a translation in the administration section. Wordpress usually provides .po files containing translations for a variety of languages. These files can be found in wp-includes/languages.
  3. The translation should be carried out manually, using a program such as poEdit, which extracts elements yet to be translated (the elements that are filtered by the predefined functions __() or _e() before being displayed on screen) from the template and stores new translations.
  4. By this point, all template and administration section elements will be translated into the new language with only the dynamic elements (such as Posts, Pages and Categories) remaining in the original language. To display these elements in the new language, you will need to enclose the new text within tags (lang_xx, where xx corresponds with the ISO code of the new language), the same process as when creating new elements. The image below shows how to define a category in English and Spanish.

install7

Category names and titles and content of posts and web pages should also be translated using tags. It is important to note that as well as data fields, there is a field called slug (also referred to as the URI name), which represents the elements short name and is used to agree access to the URI. It is therefore important that each slug is unique.

Tags: ,