This guide will show you how to easily and safely change the text associated with the MyListing theme and any plugins on your website with Loco Translate (Free). I’ll also show you how to apply styling to your text within the Loco Translate.
Note: I’m creating this guide as a US-based company, where I’ll specifically reference the English language and approach it as if someone has never “translated” their website.
How to Translate the MyListing Theme
Note: Loco Translate works directly with the parent theme, even if you have the MyListing Child Theme in place.
- WordPress Dashboard > Loco Translate > Themes > Select’ MyListing’
- Click ‘New Language’.
- Choose Language > WordPress Language > English (United States)
- Choose Location > Accept the default location of ‘Custom’.
Important: Do not choose the ‘Author’ or ‘System’ option, as this will allow future theme updates to overwrite your translations.
- Click ‘Start Translating’.
- Click ‘Sync’ to ensure you have the most recent translation strings.
- Filter Translations Box > Enter the text you wish to change (ex. “Choose a Package”).
- Source Text Area > Choose the corresponding text.
- With the Source text selected, enter the new text you would like to see (ex., Choose Listing Package) in the English (United States) translation box.
- Save changes.
Do Translations Remain After Removing the Loco Translate Plugin?
The plugin must remain installed and active when you store translation files according to best practices (outlined above). So, if you plan to remove Loco Translate from the picture, save (or relocate) all your translations using either the ‘Author’ or ‘System’ option and note the risk.
Loco Translate is a lightweight plugin that doesn’t impact your website’s performance, so I recommend leaving it in place because translating websites is rarely, if ever, finished.
Did You Know You Can Style Text Within Loco Translate?
Yep, it’s true! When you reach the step within the translation process where you select the source text and enter the new text you would like to see, you can also apply some HTML. Examples here and here.
Quick and Dirty Method
This method is acceptable if you want to apply minimal styling, but I don’t recommend applying a bunch of HTML directly to Loco Translate to get the styling you want; there are better ways to do it.
<span style="color: #fff;font-weight:800, font-size:30px;letter-spacing:1px;text-transform:uppercase">Choose Package</span>Optimal Method
With this method, we apply a CSS class to the specific text we want to style and then use a solution like WPCodeBox to assign and optimally serve CSS.
<span class="addlistingheading">Choose Package</span>Geeky Notes From the Field
Before Loco Translate was installed, the /wp-content and /wp-content/themes folders of your WordPress installation did not contain a languages folder. However, the /wp-content/themes/my-listing folder does contain a languages folder.
The language folder with a default MyListing installation (/wp-content/themes/my-listing) contains my-listing.mo and my-listing.pot files, as well as translations for Portuguese Portugal (pt_PT.mo and pt_PT.po), Portuguese Brazil (pt_BR.mo and pt_BR.po), Russian, and German. If Portuguese Portugal, Portuguese Brazil, Russian, or German are irrelevant to your website, you can safely delete them from the Loco Translate plugin or via FTP.
If you followed the steps in the previous section, in their entirety, a languages folder is created at the root of the /wp-content folder, and the path that you’ll then focus on is the /wp-content/languages/themes. In that folder path, you should have the my-listing-en_US.mo and my-listing-en_US.po files.
After you save your first “translation,” the original my-listing-en_US. PO file will be backed up and have “-backup” appended to the filename. The new my-listing-en_US.po file will contain your “translations”, while the associated my-listing-en_US.mo file will be what WordPress reads for your “translations.”
How to Translate Plugins
- Loco Translate > Plugins
- Select the plugin you wish to translate.
- Follow the same steps as when translating the MyListing theme.
