MAS Videos comes localization-ready out of the box. All that’s needed is a translation file for your language.
There are several methods to create a translation, most of which are outlined in the WordPress Codex. In most cases you can contribute to the project on translate.wordpress.org. For creating custom translations:
Both methods are covered in this doc.
WordPress needs to be told which language it should run.
- Go to: Dashboard > Settings > General and change the Site language.
Once this has been done, the shop displays in your locale if the language file exists. Otherwise, you need to create the language files (process explained below).
We maintain translations at our project on GlotPress. If you want to contribute translated strings to your language or wish to start a new translation, register at WordPress.org and start translating.
Translation is managed by teams over at translate.wordpress.org. Stable versions and development versions of MAS Videos are translated here, and anyone can contribute.
When you install or update MAS Videos, WordPress will look for a 100% complete translation in your language and automatically download it. If there is no 100% complete translation you can download it manually, or we encourage you to contribute to get it to 100% so all users can benefit.
If you’re new to translating, checkout the translators handbook to get started.
1/ Go to https://translate.wordpress.org/projects/wp-plugins/masvideos and look for your language in the list.
2/ Click the title to be taken to the section for that language.
3/ Click the heading under Set/Sub Project to view and download a Stable version.
4/ Scroll to the bottom for export options. Export a .mo file for use on your site.
5/ Rename this file to masvideos-YOURLANG.mo (e.g., Great Britain English should be en_GB).
6/ Upload to your site under wp-content/languages/masvideos/. Once uploaded, this translation file may be used.
MAS Videos includes a language file (.pot file) that contains all of the English text. You can find this language file inside the plugin folder in masvideos/languages/.
1/ Download the free plugin called Loco Translate from here. Or add directly from the WordPress administration via Plugins > Add New.
2/ Install and Activate.
3/ Go to the new Loco Translate menu item created in your Dashboard with five sub-sections.
4/ Go to the Plugins section, and select MAS Videos:
5/ Add new languages using the Add New Language link:
6/ Choose the language to add in the list, or enter the language ISO code (ex: fr_FR, en_US etc…), and select the folder to add the translation files to, and click Start Translating:
Note that Loco Translate offers three different locations for your create the translating, the best choice is Custom if you are looking to have your own custom translating, you should avoid “Author” location since it’s inside the plugin and will be override on updates, there is also the “System” location that will be override by translations from translate.wordpress.org.
7/ Save when finished:
Note that when a new version of MAS Videos is released and updated on your site, you need refresh the .po file to look for new strings. Use the “Sync” button to find any new string to start translating.
PoEdit is a more advanced alternative to Loco Translate. Only advanced users or translators wishing to create a custom translation to MAS Videos should attempt this method.
MAS Videos comes with a POT file that can be imported into PoEdit to translate.
To get started:
1/ Open PoEdit and go to File > New catalog from POT file.
2/ Choose masvideos.pot and PoEdit will show the catalog properties window:
3/ Enter your name and details, so other translators know who you are, and click ‘OK‘.
4/ Save your .po file. Name it based on what you are translating to, i.e., a GB translation is saved as masvideos-en_GB.po . Now the strings are listed.
5/ Save after translating strings. The .mo file is generated automatically.
6/ Update your .po file by opening it and then go to Catalog > Update from POT file.
7/ Choose the file and it will be updated accordingly.
Using the Say What? plugin can assist if you only wish to translate or change a few words without editing a WordPress theme’s .PO file. Requires no custom code.
When activated, it asks for:
- Original string — text you are translating. View the plugin source code to see the exact string.
- Text domain — masvideos
- Text you want to display