Translating Static Strings
How to Translate Static Strings Properly?
Here is a short visualization of how to deal with string translations:

Install Loco Translate
The easiest way to translate the theme is by using the Loco Translate plugin.
Loco Translate is a free plugin that can be installed from WordPress's default repository.
In the WordPress dashboard go to Plugins>Add New Plugin:

On the opened page, search for Loco Translate, then install and activate it.

Change The Website and WordPress Language
When you change the website and/or WordPress language, the Motor Theme and bundled plugins' interface (plugin's static strings) will also change, as long as it has been translated into your chosen language.
Change the site Language
Open the general settings from the WordPress dashboard: Settings > General:

Find the Site Language setting and select the language according to your needs:

Save the changes:

Change the WordPress (including plugins) Language
Go to Edit Profile on the upper-right corner:

Alternatively, you can also follow WordPress Dashboard > Users > Profile:

Find the Language setting then choose the one according to your needs:

Update the profile settings:

Creating the Translation File
Open the Loco Translate by following WP Dashboard > Loco Translate > Motors Theme:

In this page you can see the Motors Theme and the list of other bundled plugins. With the help of Loco Translate you can translate any of them.
But in this documentation we will focus theme translation.
On the opened page you can see the list of translated languages. You can edit any of them according to your needs. But now, we gonna learn how to create a new language. So Click on the New Language Button:

Select the language that you want to translate to. In case there is no needed language in the list, you can freely use the Custom Language option. Choose the last option (
languages/themes/motors-en_US.po) as the location:
for plugins
languages/plugins/...as the location;

After clicking the Start Translation button, you will be directed to the Loco Translate editor where you can start translating the plugin strings.
Translation Process
The translation process is straightforward. Just write the translation to the designated area and save the changes:

For instance:
Loco Translate
%s commented - "%d" on listing %m
%s comentó - "%d" en el listado %m
On the website
Jane commented - "Nice car" on listing BMW X7
Jane comentó - "Nice Car" en el listado BMW X7
Example
Let's change the text inside the 'TRADE IN FORM' button. We will change it to 'TRADE IN (LOCO)' just for testing.

Search for 'Trade in form' and write 'Trade in (LOCO)' to the translation and save the changes:

That's it ✅, here is the result:

Update Translation File
Stylemixthemes cares about its clients, so we continuously add new and colorful features to our themes and plugins to improve them. That's why it's important to keep your themes and plugins up to date. During updates, new strings will be added or removed.
Follow WP Dashboard > Loco Translate > Themes > Motors and click on the Edit Template button:

Click on the Sync button to start synchronization:

You can see what kind of changes were made. Click on the Save button:

Last updated
Was this helpful?