How to translate WordPress themes for easier access / WordPress

Allowing customers to manage their websites in their native language is an important aspect of accessibility. If you develop a website WordPress can have users from non-English speaking countriesmay be needed to translate the theme.

Theme localization doesn’t mean you translate frontend content like posts and pages; instead, it refers to Content related to the topic in the admin area: description, options and customizer of the theme.

The WordPress Core team puts a lot of emphasis on translating WordPress Core. It has been translated into many foreign languages; that makes WordPress a truly global content management system.

Theme localization is possible extremely useful for clients who use the admin area in their native language, on the other hand, an important part of their admin settings (settings under the “Appearance” menu) will be displayed in English, while other parts of the control panel are in their native language. surname. It’s not really a seamless experience.

Internationalization versus localization

Making a theme accessible in other languages ​​requires 2 main steps: internationalize and localization. I18n (internationalization) and l10n (localization) represent two sides of the same coin.

I18n is a process in which theme developers add features to their themes make later translation possible. When a theme is supplied with i18n features, it is called translation ready, but it does not mean it has been translated.

Translation occurs during l10n, when a translator, developer, or website owner translates a topic into a foreign language, using i18n features that the theme author added to the theme previously.

In this guide we will look at How to give l10n to a threador with other words how to translate it into a foreign language (in our example, into Spanish).

1. Find a translation-ready WordPress theme

You don’t have to be a developer or know how to code if you want to localize a WordPress theme, you just need to speak your chosen language.

First of all, you need to find a translation-ready WordPress theme. This is an easy task, as in the Official WordPress Theme Directory they are marked with the “ready to translate” label.

Read More:   How to launch a successful WordPress website? With one of these Top WP Themes / WordPress

You don’t have to do anything other than click on “Feature Filters”, check the “Ready to translate” feature, hit “Apply Filters” and choose the theme you like best.

2. Add translations with Poedit

If a theme is tagged as translation-ready, it means that the author has added i18n features to that theme. Each topic is ready to translate contains a file with the extension .POT allows you to easily translate the subject.

First of all, you need to find this file; it’s usually inside / language folder. A .POT file is a translation template file that can be translated into any language. You need to load this file into the translation editor Poedit.

Since Poedit is a standalone program that runs from your desktop, you need to download and install it first. There are other translation editors as well, but Poedit is probably the most widely known. If you choose another software, you should use one gettext editor.

After you complete the installation of Poedit, you will see the following screen:

2.1. Create a new translation

Unfortunately the “Translate WordPress theme or plugin” option can only be selected by users upgrading to Poedit Pro, so we will choose the second option, namely “Create a new translation”.

After clicking on it, select the .pot file you located earlier. When this happens, you need to select the language in which you want the translation to be performed from the drop-down list.

In this guide, we’ll choose Spanish, but the translation works the same for any other language.

2.2. File translation

Translation is a pretty straightforward process in Poedit: the source text is cut into shorter chainsand you need to translate strings one by one. The good news is that you don’t have to translate the entire file at once, you can save your work and come back when you want to continue.

Read More:   Install Google Custom Search Engine (CSE) on WordPress / WordPress Site

2.3. Check translation properties

Before saving the translation, you should check the translation properties. You can find them under Category > Properties top bar menu item. The first two items inside the Translating Properties popup, the project name and the Language are set by default by Poedit, but it is important to pay attention to the next one, Plural form.

Plural forms are an important aspect of translation, as in every language there are specific patterns that translation editor software needs to know in order to process them properly.

The plural form uses the following syntax: nplurals = 2; plural = (n! = 1); (in the case of Spanish).

Poedit sets default plural translation rules, but you can modify them if you want. You can find a list of suitable plural forms in many languages ​​in this handy shirt, but if you want to understand how plural forms work in gettext editors, read on. this manual about it.

You can also set charset in Translation Properties. The default is UTF-8 and that’s the safest way to choose, as it can be used for all languages, but of course you can also use a more specific character set such as iso -8859-1 for Latin-1 languages ​​like spanish.

On the W3C checklist you can always check that you have selected the correct language you want to do the localization in.

2.4. Save the translation file

When you save the translation, it is important that you use correct format. At the end of the file’s name, you need to include the appropriate part Nation and language code.

WordPress uses the gettext language – country code, you need to add the appropriate language code first, followed by an underscore and finally the country code for the spanish format es_ES.

Luckily Poedit is such a handy program that if you click the Save button in the top menu bar, it will give you the right language code in the “Save As…” pop-up window. The first two letters represent the language code and the second two the country code.

Read More:   Top 10 Figure Skating Forums, Discussions, and Message Boards You Must Follow in 2021

You also need to enter the name of the theme before the language country code, so the example file will be saved in the twenty-five_es_ES.po file name. The .PO (Portable Object) file contains the translation and you need to open it if you want to modify the translation later.

If you look at / language folder of your theme, you will notice that Poedit has also saved another file with the extension .MO. It’s a compiled translation file and you need it too if you want your localized site to work properly.

3. Upload your translation file

Now that the translation files are ready, you need to upload the modified theme to your server with the help of FTP clients. You can upload the entire theme again, but you can also insert only two new translation files (.po and .mo) cho / language folder of your theme.

Final Note

You need to create your own translation file (.PO and .MO files respectively) with Poedit for each language you want the theme to be available in.

What’s really cool about WordPress is that if your client changes the language of the admin area below Settings > General dashboard menu, WordPress will automatically select the appropriate translation files for topic.

Last, Ched All sent you details about the topic “How to translate WordPress themes for easier access / WordPress
❤️️”.Hope with useful information that the article “How to translate WordPress themes for easier access / WordPress
” It will help readers to be more interested in “How to translate WordPress themes for easier access / WordPress
[ ❤️️❤️️ ]”.

Posts “How to translate WordPress themes for easier access / WordPress
” posted by on 2023-01-17 14:11:07. Thank you for reading the article at Chedall.com

Back to top button