This is the official YOURLS .pot file to generate and maintain your own translations.
Note
Check the release archives for older versions.
- Download the translation file template
YOURLS.pot - Rename it to
[your-locale].po, where[your-locale]is typicallylanguage code, underscore, country code(for instance in Portugal that would bept_PT, while in Brazil itβd bept_BR). You'll find a complete list here. - Install a translation tool: itβs nothing more than a text editor capable of reading
.pofiles, showing you the untranslated string and a text box where you type in the translation, and saving a.mofile which is what PHP needs.
There are downloadable offline tools, such as poEdit, or online tools like TranslatePOT which can even (attempt to) translate automatically. - Translate all the strings and save your work; you'll end up with a fully translated
pt_BR.poand the generatedpt_BR.mo
- Install the latest YOURLS release
- Drop your
pt_BR.poandpt_BR.mofiles inuser/languages - Add
define( 'YOURLS_LANG', 'pt_BR' )to yourconfig.php - Thatβs it! Play with YOURLS to check everything is fine
When your translation file is all fine, make sure others can benefit from your hard work!
- Upload your two
POandMOfiles somewhere on the interweb.
It's best to use a source control service, such as Github or GitLab: this will make your changes easy to track, your files easy to maintain, and others' contributions easy to implement. - Make it clear for users: a directory with clearly labelled files (
yourls-1.6-pt_BR.zipfor instance) so they know what to pick. - Open a pull request on https://github.com/YOURLS/awesome-yourls and get your translation listed!
See https://github.com/YOURLS/awesome#translations
Thanks to LeoColomb - L10n was a low priority feature but he threw his patch at my face :)
License is "Do whatever the hell you want with it".