How to Use Loco Translate With MyListing
Get the knowledge your online business needs to succeed.
The How To Use Loco Translate With MyListing guide will show you how to easily change the text associated with the theme and associated plugins.
Note: As a US-based company any changes we make within this guide reference the English language.
Translate the MyListing Theme
While we recommend using the MyListing ChildTheme regardless, Loco Translate works directly with the parent theme, and translations are retained as long as the correct settings are chosen.
- Browse to Loco Translate > Themes
- Select My Listing
- New language
- Choose a language > English (United States)
- Choose a location > Leave it at the default setting of Custom or choose System. (Note: Do not choose the “Author” option, as that will allow your translations to be overwritten with future updates to the theme.)
- Click Start translating
- Click the Sync button to ensure you have the most recent data (“strings”)
- In the Filter translations box, enter the text you wish to change (ex. “Choose a Package”), and choose the exact match from the Source text section
- With the Source text selected, enter the new text you would like to see (ex. Choose Listing Package), in the English (United States) translation section
Geeky Notes From the Field
Prior to the Loco Translate plugin is installed, the /wp-content and /wp-content/themes folders of your WordPress installation do not contain a languages folder. The /wp-content/themes/my-listing folder does contain a languages folder.
The language folder that comes with a default MyListing installation (/wp-content/themes/my-listing) contains translations for Portuguese Portugal (pt_PT.mo and pt_PT.po), Portuguese Brazil (pt_BR.mo and pt_BR.po), Russian, and German. If any of these languages will never be of importance to your website, you can safely delete them from the Loco Translate plugin or via FTP. With our current MyListing websites, we only care about the English language, therefore we delete all other language translations. The folder also contains the my-listing.mo and my-listing.pot files.
If you followed the steps above 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 actually reads, for your “translations”.
- Browse to Loco Translate > Plugins
- Select WooCommerce
- From here, follow the same steps as with the MyListing theme