JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.89k stars 5.49k forks source link

[ JULEP ] Add Internationalization (i18n) and localization (l10n) support. (WIP) #43098

Open Ismael-VC opened 3 years ago

Ismael-VC commented 3 years ago

Julia i18n & l10n

Implementation:

Configuration

Translation

Documentation

Testing

garrison commented 2 years ago
  • Julia: Port Python gettext implementation to Julia (currently there is Gettext.jl but uses PyCall, also Gettext should be a standard library in order to localize julia itself, not just external packages).

As suggested at https://github.com/Julia-i18n/Gettext.jl/issues/1#issuecomment-868492149, an alternative to porting the Python implementation would be to depend on libintl directly. (This might not make sense if the julia maintainers explicitly avoid depending on LGPL code -- I am not sure of the latest policy on this, especially with regards to things that are optional at compile time.)

stevengj commented 1 year ago

https://github.com/Julia-i18n/Gettext.jl/pull/5 links to libgettext directly, eliminating the Python dependency.

I don't see why an LGPL (not GPL!) dependency should be a problem?

(In principle we might gain some efficiency by a pure-Julia implementation, since we can avoid allocating new String objects on each call. I'm skeptical that micro-optimizing performance is important in i18n settings, however.)