![]() ![]() You should be able to find it in the folder titled “languages” within the theme folder. You will see this screen:Ĭlick the “Create new translation” option in Poedit and browse your hard drive for a local copy of the. When the download completes, unzip the file and open the application. It’s also free to use, which eliminates a major barrier to entry for first-time translators. Poedit has been around for several years and is a favorite among developers and translators in the WordPress community. There are several translations editors out there, some of which we’ll consider toward the end of this article. Let’s get started by downloading a free translations editor. pot file for a different theme, refer to this primer in the WordPress Codex. If you’re not translating one of our themes and you need to generate a. Using Make as an example, we’ll show you how to translate the theme to Spanish – Peruvian Spanish, to be precise! Translating our themesĮvery theme from The Theme Foundry comes with a. Now let’s go over how to translate one of our WordPress themes to another language. po file to this file type so that WordPress can use it. mo: This is the “machine object file.” When your translation is complete, you will convert or export your. It’s the file we’re about to show you how to edit. po: The “portable object” file contains the original text and the translations. It doesn’t contain the translations themselves. Since it’s just a template, it serves as the basis for your translation. pot: This file is a “portable object template” that contains all of the text to be translated. Here’s a quick rundown of the three file types and what they contain: But first, let’s examine the three types of files involved in the translation process. We’re about to show you how to translate our themes. Tip: Use a virtual private network to research common terms that appear on search engine results pages in other countries. ![]() ![]() Localization can help you tailor a theme to the vernacular of a specific country or region, if you so desire. For example, our friends in the UK might “get ‘round to” a task while Americans simply “get to” it. Translating a theme can also help you “localize” it for a specific lexicon. People all around the world use WordPress! Why translate a WordPress theme? For starters, around 44% of WordPress websites are written in a language other than English. All that’s left is performing the actual translation, which is where you (or a professional translator) come(s) in. Instead of making you create a file containing the human-readable text from a particular theme, we’ve included that file with the theme itself. My-plugin.Translate our WordPress themes to another languageĪll themes from The Theme Foundry come translation-ready. I've created a method that runs load_plugin_textdomain() while following these instructions from Wordpress and have added it as an action to my-plugin _construct(): Language changed everywhere else but the plugin still renders in english. Changed Wordpress site language to translated language.Renamed files to my-plugin-pt.po and my-plugin-pt.mo.pot file in Poedit, (it displayed a list of all the strings I wanted to translate) translated plugin and generated. Used Loco Translate plugin to generate a.Added either _e() or _() to the sentences I want to be translated in my plugin files.I'm not sure what else to try so I thought that someone more experienced could point out things I might need to change. I am trying to add a translation to a plugin I wrote from scratch but after experimenting a while I'm not sure how to make Wordpress aware that there's a translation available for my plugin. ![]()
0 Comments
Leave a Reply. |