

For every language you add, you need a new PO file that includes the target language’s code. PO vs MO WordPress Language Filesįor each language that you add to a plugin or a theme, you’ll also need to use the following two file types: In a nutshell, this means the text isn’t hard-coded, but that each string can have multiple translations. This file will include all of its text strings in their original language.įor a theme to be ‘translation ready’ it needs to store its strings using the gettext system. For a plugin or theme to be ‘translation ready’, it needs to include a Portable Object Template (POT) file. Some of its strings have been translated in its language files, but others haven’t.īy ‘strings’, we mean the text components of any given element on your website, including your pages’ content. That’s because while the plugin is ‘translation ready’, it’s only partly localized. In the example above, you can see that only some of the plugin’s options appear in Spanish. If your WordPress website’s language is set to Spanish and the plugin includes the corresponding language file, its settings should be localized automatically: Let’s say, for example, that you’re using a contact form plugin and want users to be able to fill it out in Spanish. These enable you to switch between languages depending on your needs. Instead, it indicates that the product in question comes with additional language files.

However, this doesn’t mean that there are several different versions of the theme or plugin for download. When you download a popular theme or plugin, you may notice that in some cases, it’s available in more than one language: Let’s get right to it! An Introduction to WordPress Language Files Then, we’ll show you how to edit them manually, as well as alternative approaches to localization. In this article, we’ll go over the types of language files that WordPress uses. This ensures that any text they provide for your site is available in all the languages you require. It’s also crucial if you intend to translate the plugins and themes you use as well. Understanding how WordPress localization works and which files are involved in the process can come in handy when adding new languages to your site. However, regardless of which approach you choose, it pays to understand how to edit WordPress language files manually. You can do it manually, use a plugin or machine translation, or even hire a professional to do it for you. There are a lot of ways to translate a WordPress website.
