YOURLS .POT FILE FOR TRANSLATIONS
This is the official YOURLS .pot file to generate and maintain your own translations.
Awesome! How do I create my own translations?
To create translation files:
- 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). - Install a translation software: 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. A cross platform, simple yet complete editor is Poedit. - Translate all the strings. You'll have a fully translated
pt_BR.poand the generatedpt_BR.mo
To check your translation file and load it in YOURLS:
- Download latest version, of current master, or update with Git. Read this
- 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
For more details, tips and screenshots, see the related blog post
Awesome! How do I update my translation file?
When the YOURLS.pot template file is updated with new or modified strings to translate, you don't have to start over your translation file.
- Download the translation file template
YOURLS.pot - Put it in the same directory as your translation file, eg
pt_BR.po - In Poedit select Catalogue then Update from POT file. Now translate only the new strings.
Awesome! How do I make my translation available to all?
When your translation file is all fine, make sure others can benefit from you 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. If you don’t want to use SVN or Git, a regular hosting (your blog) will be OK - Make it clear for users: a directory with clearly labelled files (
yourls-1.6-pt_BR.zipfor instance) so they know what to pick. - Ping us! Open a new issue here and tell us where your translation lives so we can add it to the list of available languages
What are the available languages already?
See http://yourls.org/translations
Thanks to
LeoColomb - L10n was a low priority feature but he threw his patch at my face :)
License
Do whatever the hell you want with it.