Skip to content
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

Investigate implementing an l20n-based localization library #14495

Closed
alexcrichton opened this Issue May 28, 2014 · 5 comments

Comments

Projects
None yet
4 participants
@alexcrichton
Copy link
Member

alexcrichton commented May 28, 2014

Part of this issue is only actionable depending on the outcome of rust-lang/rfcs#93.

Localization is a very important feature for a language and is often a very difficult system to get right. Previous attempts with format! do not look like they're going to pan out, and it looks like it's possible to implement a high quality localization system purely in a library implementation.

The most likely candidate for being implemented is the l20n spec. This is a new standard coming out of Mozilla for the web which is still in some development, but it has seen deployment on Firefox OS and is planned to be deployed in Firefox. Other projects such as django are also looking into implementing this spec, so there's certainly precedent.

A rust implementation of the l20n spec would be a good solution for our localization efforts, but some finesse would be required to ensure that the library is as easily usable as the JS api itself.

Nominating, but I believe that this is not necessary for 1.0

cc @zbraniecki

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented May 28, 2014

cc #12553
cc #14494, but localization is distinct from internationalization.

@brson brson added P-high and removed I-nominated labels May 29, 2014

@brson brson modified the milestone: 1.0 May 29, 2014

@brson

This comment has been minimized.

Copy link
Contributor

brson commented May 29, 2014

P-high, not 1.0

@seanmonstar

This comment has been minimized.

Copy link
Contributor

seanmonstar commented Jun 12, 2014

I've been working on this at https://github.com/seanmonstar/l20n.rs

Parser is completeish (only lacks import). Still needs a compiler and the Context API. I'd also like to include a libl20n_macro eventually, that can compile the l20n files at compile time, and allow strict typing.

@seanmonstar

This comment has been minimized.

Copy link
Contributor

seanmonstar commented Jun 25, 2014

My repo now has a mostly working Parser and Compiler, with a Locale interface that uses Encodable and Decodable to resolve l20n resources into strings, being able to pass arbitrary variables.

And finally, got some docs: http://seanmonstar.github.io/l20n.rs/l20n/

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Feb 11, 2015

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.