-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate Shaarli to other languages #121
Comments
Hi, this was discussed at #106 (comment), and originally at sebsauvage#18. It was agreed we should use GNU gettext as the internationalization backend. Pull requests welcome. |
I posted an early sample code at sebsauvage#18 (comment) |
Another important question is, how do we select what language to display?
I'm in favor of a config setting. |
Also vote for config setting, but default could perhaps go to server locale (I can see how that would be useful for deployment). |
This fork https://github.com/broncowdd/Shinterest has multi language support |
Hi all. I don't understand what was done here to permit french translation (and other ones) on Shaarli. How can I choose french language in current Shaarli? |
Hi. This issue is still open, so it's not possible for the moment. @nodiscc was pointing out that a fork did it, but did not merge it upstream. Also, I'm not sure the |
So if I understand it well, we need someone that check Shinterest code, then include it in Shaarli (current development version) and suggest a merge proposal here? As I don't understand PHP language, it could be difficult, but copy/paste and modifying is possible 😄 I can help for translations if needed. |
Well, first we need to agree on a translation system, as copy/pasting Shinterest code might not be the best way to go. I can work on this. Then, every string displayed need to be processed through a translation function. Which means every template need to be heavily edited. Since we're entirely rewriting templates for v0.9.0, I suggest that we do that in the webdesign branch instead. Help appreciated on this. |
So after half an hour of digging through a lot of Google pages, I still have no clue if gettext is widely installed on shared hosting, but:
However, the PO format is suited for translations, including a lot of translation tools to work with. Other formats I can think of aren't really good for manual edit (JSON escaping with double back-slashes, INI and its bad PHP parser, YAML requires a lot of dependencies, etc.), and I don't really want to store translations in PHP arrays. So, I suggest we use a I'd like @nodiscc and @virtualtam opinion on this. |
Definitely in favor of using Gettext. It's a universal translation/localization format that is widely supported by each and every proper programming language/technology. Translations can be versioned and updated along the codebase, and there are powerful tools to edit them:
Localized Shaarli if it's installed & enabled, English fallback else. Gettext is universal enough that we shouldn't have to look for 3rd-party implementations.
Yup, and we can add Makefile targets to automate potfile generation and updates. |
Honestly, I'm not sure it is (as I said, major PHP projects use their own implementation and doesn't require it). But yes, using an English fallback wouldn't hurt since everything is in English now.
Yup, that's why I wanted to keep PO files. Since we disagree, I guess @nodiscc has the final word on this. |
If we're settling for gettext (either PHP's extension or a 3rd-party lib), the functional base can be laid out (PO/potfile structure + MO/machine object generation); switching from an implementation to another should only require minor changes (though the helper |
Yes. We can use a wrapper function for |
Hello ! How is this functionality ? |
Hello
Traduire shaarli ?
Cordialement.
The text was updated successfully, but these errors were encountered: