- Home
- Knowledge Base
- How To's
- Translating Pretty Links
Translating Pretty Links
There are a few plugins like Codestyling Localization that you can use to manage your translations, but sometimes these types of plugins come with their own headaches. The way we prefer to translate plugins is by using the PoEdit tool.
New Translation
Update Existing Translation
New Translation using PoEdit
- Open PoEdit
- Browse …/pretty-link/i18n/ to find the Translation Template and then copy this file to where you'll be able to find it.
- Click “Create new translation”.
- Find the file for Pretty Links Translation Template in the place you copied it. This will change the file from a template version into a translatable version.
- The translatable strings show in the list on the main body of the program. Select a string to translate, and at the bottom of the program use the “Translation:” text box to enter your new translation for that string.
Note: some strings have backslashes before quotes or characters like ” or n or ‘ and some have wildcard characters like %s or %d. The backslashes and wildcards should be left in the translation strings as well. - When you're done translating the strings you want, click on File -> Save As. You'll need to save your file as “pretty-link-{language_code}”. So if your language code is “es_ES” (Spanish) your filename would be “pretty-link-es_ES”.
- It saves two files; pretty-link-es_ES.po and pretty-link-es_ES.mo. Both files need to be uploaded to your hosting server and placed back into the …/pretty-link/i18n/ folder. This folder is erased when updating Pretty Links, so be sure to keep backup copies of your translations which you can copy back into this folder.
Note: if you would like to submit your translation files to us, we can include them in future releases of Pretty Links. Your translation would also benefit others using Pretty Links in your language. - Set your site language appropriately in the Dashboard -> Settings -> General tab (see screenshot below).
Update Existing Translation Using PoEdit
- Open your existing .po translation file. So if it was a Spanish translation you would open pretty-link-es_ES.po.
- Click on Catalogue -> Update from POT file.
- Browse to the new …/pretty-link/i18n/pretty-link.pot file.
- A window will pop-up showing you a list of new translatable strings and one's the were removed. Click on OK.
- The translation strings list will update and you can now edit the new translatable strings.
- When done translating, click on Save.
- Upload the modified .po and .mo files back to your hosting server.