How to translate plugin strings and theme strings on WordPress

How-to-translate-plugin-strings-and-theme-strings-on-WordPress
Table of Contents

Translating websites into several languages ​​can provide many benefits for you.

Translating plugin strings and theme strings can help broaden your user reach and get users from different countries. By offering multilingual support, you can provide a better experience to your users and build strong relationships with a global user community.

Therefore, it is important for you website owners to know how to translate plugin strings and theme strings on WordPress. Translating WordPress plugins and themes can be done in several ways which we will discuss below.

What are plugin strings and theme strings on WordPress?

Before going into how to translate plugin strings and theme strings on WordPress, you must first know what plugin strings and theme strings are.

On WordPress, the plugin string is the text that is displayed inside a WordPress plugin. These strings can include elements such as menu labels, button text, error messages, informational messages, and other text content that is part of the plugin’s user interface.

Meanwhile, theme strings on WordPress refer to text that is part of a WordPress theme. These strings include elements such as titles, paragraph text, button labels, navigation menu items, widget titles, and any other text that appears on the front view of a website using that theme.

The process of translating plugins and theme strings is usually done using translation files or by using translation management tools such as third-party translation plugins. Plugin developers can also provide language files or work with translators to make their plugins available in multiple languages.

By translating plugin and theme strings, plugin developers can make their plugins and themes more accessible, user-friendly, and globally appealing, so that users from different language backgrounds can use and benefit from the plugins effectively.

There are several ways you can translate the plugin and theme strings. The first one we’ll discuss is a manual edition that you can do using a local software like Po Edit on from the WordPress admin using Loco Translate plugin.

Translate plugin strings and theme strings on WordPress using Loco Translate

The first way is to use the Loco Translate translation plugin. We’ll stick with this method for manual file edition because it’s a bit faster than using a Windows or Mac software. Loco Translate is a plugin that can translate plugin strings and theme strings on WordPress.

In one installation on WordPress, Loco Translate can be used on all plugins or themes on the WordPress website. The following are the steps for translating plugin and theme strings on WordPress.

Step 1: Install the Loco Translate plugin

The first step is to install the Loco Translate plugin on your website, by entering the Plugins menu > Add New > Loco Translate > Install > Activate.

If it has been successfully installed, then select the Loco Translate menu then themes and plugins that are active and integrated with Loco Translate will appear.

List of active theme and running plugins

Both translating plugin strings and theme strings in Loco Translate are the same, you only need to select the plugin or theme you want to translate.

So, in this example, we will try one of the active themes, namely Astra.

Step 2: Add language to custom plugin strings and theme strings

After that a display appears as below, here you can click New Language to add a new language.

WordPress theme settings

An example of the destination language is Korean. Then choose where the location of the .po file will be saved, if so, click Start translating.

Translation setup for Korean language in Astra theme

Step 3: Start to translate plugin strings and theme strings

The third step is to start translating plugin or theme strings, in the search field look for the strings to be translated, for example, strings Read More.

 

Then in Korean translation: enter the results of the Korean translation that you have translated manually. Likewise do the other strings, if you have clicked Save to save the results of the translation of the strings.

Translation interface for WordPress website. It shows source text and translation options.

That’s how to translate plugin strings and theme strings on WordPress using Loco Translate. Loco Translate allows you to translate strings one by one, it’s just that you have to translate them manually first and then copy the translation results into the destination language column.

Translate plugin strings and theme strings from the WordPress directory

Apart from using Loco Translate, you can also use a translation service from WordPress, only this can be done if your theme is located in the WordPress directory, not from outside.

Because themes can be on wordpress.org or not and some of them include additional plugins that load various content. For example a theme with a WooCommerce widget from Themeforest.

Immediately, we will try to translate theme strings manually via Translating WordPress. Here are the steps.

Step 1: Go to Translating WordPress and choose language

The first step is to click on the Find your locale column and then select the destination language. Then click on the language.

Translation statistics for German locales

Step 2: Find your themes WordPress and export the .mo file

After that a display appears as below select the Themes column then look for the theme that you will translate the strings for, an example of the theme to translate is Astra.

As you can see below, the German language on the Astra WordPress theme has been translated by 72%, meaning that most of the theme strings on Astra have been translated into German.



screenshot of a black and white website layout

Then click Astra in the display below.

Webpage export options menu

Step 3: Upload .mo file on WordPress

The final step is to upload the .mo file to WordPress, the method is as follows.

  • Go to WordPerss dashboard hover over the Appearance menu, and select Editor. This will open the theme editor.
  • On the right side of the theme editor, you will see a list of theme files. Look for and select the functions.php file from the list.
  • Once the functions.php file is open in the editor, add the following code at the very bottom of the file:
				
					<rule name="Linguise language redirection" stopProcessing="true">
	<match url="^(af|sq|am|ar|hy|az|eu|be|bn|bs|bg|ca|ceb|ny|zh-cn|zh-tw|co|hr|cs|da|nl|en|eo|et|tl|fi|fr|fy|gl|ka|de|el|gu|ht|ha|haw|iw|hi|hmn|hu|is|ig|id|ga|it|ja|jw|kn|kk|km|ko|ku|ky|lo|la|lv|lt|lb|mk|mg|ms|ml|mt|mi|mr|mn|my|ne|no|ps|fa|pl|pt|pa|ro|ru|sm|gd|sr|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|te|th|tr|uk|ur|uz|vi|cy|xh|yi|yo|zu|zz-zz)(?:$|/)(.*)$"  />
	<action type="Rewrite" url="/wp-content/plugins/linguise/script.php?linguise_language={R:1}&amp;original_url={R:2}"  appendQueryString="true" />
</rule>
				
			
  • Make sure to replace theme-textdomain with the appropriate text domain of your theme.
  • Save the changes to the functions.php file.
  • Now, create a directory named languages inside your theme directory. For example, if your theme is named mytheme, create a directory called mytheme/languages.
  • Move the .mo file you prepared into the languages directory.
  • Go back to the WordPress admin panel. Under the Appearance menu, select Editor again.
  • On the right side of the theme editor, look for and select the style.css file from the list of theme files.
  • Ensure that the following code is present within the comments at the top of the style.css file:
				
					<rule name="Linguise language redirection" stopProcessing="true">
	<match url="^(af|sq|am|ar|hy|az|eu|be|bn|bs|bg|ca|ceb|ny|zh-cn|zh-tw|co|hr|cs|da|nl|en|eo|et|tl|fi|fr|fy|gl|ka|de|el|gu|ht|ha|haw|iw|hi|hmn|hu|is|ig|id|ga|it|ja|jw|kn|kk|km|ko|ku|ky|lo|la|lv|lt|lb|mk|mg|ms|ml|mt|mi|mr|mn|my|ne|no|ps|fa|pl|pt|pa|ro|ru|sm|gd|sr|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|te|th|tr|uk|ur|uz|vi|cy|xh|yi|yo|zu|zz-zz)(?:$|/)(.*)$"  />
	<action type="Rewrite" url="/wp-content/plugins/linguise/script.php?linguise_language={R:1}&amp;original_url={R:2}"  appendQueryString="true" />
</rule>
				
			
  • Make sure to replace theme-textdomain with the appropriate text domain of your theme.
  • Save the changes to the style.css file.

So far, you have successfully translated the theme strings manually by uploading the destination language file to WordPress. In this way you don’t need to translate the strings one by one, it’s just that you have to upload files for each language, this of course will take more time.

Break Language Barriers
Say goodbye to language barriers and hello to limitless growth! Try our automatic translation service today.

How to translate plugin strings and theme strings on WordPress with Linguise

Translating WordPress makes it easier for you to translate theme and plugin strings, but you need to choose a language and upload them one by one.

This of course will take quite a while, therefore you can use other alternative translation services, such as Linguise.

Linguise is an automatic translation service for websites available in 85 languages. Linguise uses neural network technology so that it is able to produce translations that are 97% similar to human translations.

With Linguise it allows you to automatically translate plugin and theme strings in WordPress.

Then, how to translate plugin strings and theme strings on WordPress? Check out the explanation below.

Step 1: Registration Linguise account

The first step is to register for a free Linguise account, you only need to enter some information related to personal data and don’t need a credit card to register.

After that, you will get access to the Linguise dashboard. It is on this dashboard that you can make some translation settings.

Step 2: Add external translators to Linguise

On the Linguise dashboard, you can also add new members or translators from outside. This new member can become a translator who is better at translating websites including plugin strings and themes. Here’s how.

First, open the Linguise dashboard then select the Members menu > Invite a new member.

A screenshot of a black background with white text.

After that, enter the email address, select the role, namely translator, select websites, select the destination language to be translated by the translator, then click Invite. If so, an invitation will be sent via email.

Server monitor configuration panel

As a translator, he will get several accesses including the following.

  • Just front-end live editor (not global rules).
  • Only have access to languages ​​that have been selected by the previous admin.
  • Translators cannot edit domain configurations, languages ​​available on websites, or billing information.

Step 3: Start translating plugin and theme strings via live-editor

If you have successfully added a translator, now is the time to try translating plugins and theme strings via the live editor feature.

To do this, open the Linguise dashboard > Live Editor > Open Live Editor > choose language > Translate.

 

After that a display appears as follows, select the part to be translated, you can translate or change the translation of the plugin and theme strings in the Translation in Indonesian column: if you have, click Save to save the changes.

Screenshot of translation interface from English to Indonesian

So far, you have successfully translated plugin strings and theme strings on WordPress with the Linguise live editor.

If you need more translators, you can add translators according to each language.

Troubleshooting common translation issues in popular themes and plugins

How to translate plugin strings and theme strings on WordPress

Translating strings in WordPress plugins and themes is often straightforward, but sometimes you may encounter issues that prevent translations from displaying correctly. Understanding common problems and how to resolve them will help you maintain consistent and high-quality multilingual content on your site.

Strings are not showing translated

Some strings do not appear in the desired language even after creating translation files. This is usually caused by a mismatch in the text domain between the translation files and the plugin or theme being used. The text domain acts as an identifier linking the translatable text to the correct translation file, so if it does not match, WordPress won’t display the translation.

Additionally, caching or optimization plugins may cause translated strings not to appear immediately. Cached pages might show an older version before the translation was applied. Therefore, it is important to clear both your site’s and browser’s cache after making translation updates to ensure the latest changes are visible.

Missing translation files (.po/.mo)

Some plugins or themes might not include .po and .mo files for the language you need, meaning you cannot rely on built-in translations. In this case, you must create your translation files using tools like Loco Translate or import translation files from other sources.

Creating .po and .mo files manually requires time and care but is an effective way to ensure all important strings are translated. Also, ensure your translation files are saved in the correct locations so WordPress can recognize and use them when loading your site.

Dynamic or JavaScript-rendered strings not translated

Certain text in plugins or themes is dynamically generated using JavaScript, which is not included in the standard translation files (.po/.mo). This makes these strings unavailable for manual translation using traditional methods.

To handle this, you can use automatic translation services like Linguise, which translate text in real time on the client side, including JavaScript-rendered elements. Alternatively, look for options within the plugin or theme to override such texts manually via settings.

Plugin/theme updates overwrite translation files

When a plugin or theme is updated, your translation files may be overwritten or deleted, especially if they reside in the main plugin or theme directory. This causes all your translations to disappear, and the site will revert to the default language.

To prevent this, store your .po and .mo files in custom language folders (e.g., wp-content/languages/plugins or wp-content/languages/themes) or use a child theme to keep translations. This way, updates won’t remove your translation files, and your site will retain the configured languages.

Validating translations for SEO

How to translate plugin strings and theme strings on WordPress

When translating your website’s content, it’s crucial to ensure linguistic accuracy and validate that the translations support your site’s SEO performance. Properly localized SEO elements help search engines understand and rank your multilingual pages effectively, driving targeted traffic from different languages.

Titles and meta descriptions

Translated page titles and meta descriptions must accurately reflect the content while incorporating relevant keywords in the target language. Poorly translated or generic meta tags can reduce click-through rates from search results, as they may not appeal to local audiences or align with their search intent.

For example, suppose you run a travel blog and translate a “Best Beaches in Bali” post into Spanish. In that case, the title should be localized to something like “Las Mejores Playas en Bali” rather than a literal, awkward translation. This ensures that Spanish-speaking users searching for Bali beaches find your page more relevant and compelling.

Alt text for images

Image alt text plays a significant role in accessibility and SEO by describing images to search engines and users with visual impairments. When localizing your website, alt text must be translated accurately to maintain these benefits and avoid SEO penalties for irrelevant or missing descriptions.

For instance, if you have an image of a mountain view with alt text “sunset mountain,” translating this to German, you should use “Sonnenuntergang Berg” or a natural equivalent. This helps search engines associate your images with relevant keywords in the target language and improves page relevance.

URL slugs

URL slugs, the readable part of your web address, should be localized thoughtfully. At the same time, you want URLs to be understandable and SEO-friendly in the target language, automatically translated slugs can sometimes become confusing or nonsensical.

For example, a blog post titled “Healthy Recipes” should have a Spanish slug like /recetas-saludables rather than a machine translation that might create an awkward phrase. Clear, relevant slugs help users and search engines improve click rates and ranking.

Services like Linguise automatically translate URL slugs based on the user’s target language, ensuring each language version has SEO-friendly, natural URLs without manual effort.

Multilingual sitemap

Generating separate sitemaps for each language version of your site helps search engines crawl and index your pages correctly. A multilingual sitemap communicates the available languages and ensures all translated content is discoverable.

For example, if your site supports English, French, and Japanese, you should create distinct sitemaps like sitemap-en.xml, sitemap-fr.xml, and sitemap-ja.xml and submit them to search engines via tools like Google Search Console. This setup aids indexing and helps your pages rank in the right language-specific search results.

Tools like Linguise can automatically create and manage multilingual sitemaps, simplifying this process and ensuring your translated pages are properly indexed without manual effort.

Hreflang tags

Hreflang tags are essential HTML attributes that signal to search engines which language and regional version of a page to show users. Proper implementation prevents duplicate content issues and improves user experience by directing visitors to the correct localized page.

For example, if you have a page in US and UK English, using hreflang tags like hreflang=”en-us” and hreflang=”en-gb” informs search engines about these versions. This avoids confusion and ensures your users see the most relevant content for their locale.

Linguise also automates the insertion and management of hreflang tags, helping search engines understand the relationship between your multilingual pages and reducing the risk of SEO penalties.

Case studies: Real users improving engagement by localizing plugin and theme strings

How to translate plugin strings and theme strings on WordPress

One compelling example of how translating and localizing plugin and theme strings can boost engagement is the story of Jaderoller. This beauty e-commerce brand successfully expanded its market internationally using WordPress and WooCommerce. By accurately translating plugin strings and localizing their entire website experience, Jaderoller overcame the challenge of delivering multilingual content efficiently while maintaining strong SEO performance.

Using Linguise, an automatic translation solution tailored for WordPress, Jaderoller seamlessly translated all plugin and theme strings. Linguise’s advanced features, including automatic hreflang tags, multilingual sitemaps, and SEO-friendly translated URL slugs, ensured their multilingual pages were optimized for search engines. 

This approach helped increase traffic by 50% to 150% for each additional language, significantly enhancing user engagement and expanding their global reach without sacrificing website speed or SEO quality.

Ready to explore new markets? Try our automatic translation service for free with our 1-month risk-free trial. No credit card needed!

Conclusion

Translating plugin strings and theme strings is important for those of you who want to have a multilingual website. Apart from that, a multilingual website also provides many advantages ranging from reaching a wider audience, penetrating international markets, and providing the best experience for visitors.

So, what are you waiting for? Immediately create your multilingual website with Linguise. Linguise offers a 1-month free trial version for those of you who want to try Linguise’s features.

With Linguise, you will get translation benefits of up to 600 thousand words and unlimited language use.

You may also be interested in reading

Don't miss out!
Subscribe to our Newsletter

Receive news about website automatic translation, international SEO and more!

Invalid email address
Give it a try. One per month and you can unsubscribe at any time.

Don't leave without sharing your email!

We can’t guarantee you’ll win the lottery, but we can promise some interesting informational news around translation and occasional discounts.

Don't miss out!
Invalid email address