1- # Fluent Locale
1+ # Fluent LangNeg
22
3- ** Fluent Locale is a library for language and locale identifier negotiation.**
3+ ** Fluent LangNeg is a library for language and locale identifier negotiation.**
44
5- [ ![ crates.io] ( http://meritbadge.herokuapp.com/fluent-locale )] ( https://crates.io/crates/fluent-locale )
6- [ ![ Build Status] ( https://travis-ci.org/projectfluent/fluent-locale -rs.svg?branch=master )] ( https://travis-ci.org/projectfluent/fluent-locale -rs )
7- [ ![ Coverage Status] ( https://coveralls.io/repos/github/projectfluent/fluent-locale -rs/badge.svg?branch=master )] ( https://coveralls.io/github/projectfluent/fluent-locale -rs?branch=master )
5+ [ ![ crates.io] ( http://meritbadge.herokuapp.com/fluent-langneg )] ( https://crates.io/crates/fluent-langneg )
6+ [ ![ Build Status] ( https://travis-ci.org/projectfluent/fluent-langneg -rs.svg?branch=master )] ( https://travis-ci.org/projectfluent/fluent-langneg -rs )
7+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/projectfluent/fluent-langneg -rs/badge.svg?branch=master )] ( https://coveralls.io/github/projectfluent/fluent-langneg -rs?branch=master )
88
99Introduction
1010------------
1111
12- This is a Rust implementation of fluent-locale library which is a part of Project Fluent.
12+ This is a Rust implementation of fluent-langneg library which is a part of Project Fluent.
1313
1414The library uses [ unic-langid] ( https://github.com/zbraniecki/unic-locale ) and [ unic-locale] ( https://github.com/zbraniecki/unic-locale ) to retrieve and operate on Unicode Language and Locale Identifiers.
1515The library provides algorithm for negotiating between lists of locales.
1818-----
1919
2020``` rust
21- use fluent_locale :: negotiate_languages;
22- use fluent_locale :: NegotiationStrategy ;
23- use fluent_locale :: convert_vec_str_to_langids_lossy;
21+ use fluent_langneg :: negotiate_languages;
22+ use fluent_langneg :: NegotiationStrategy ;
23+ use fluent_langneg :: convert_vec_str_to_langids_lossy;
2424use unic_langid :: LanguageIdentifier
2525
2626// Since langid parsing from string is fallible, we'll use a helper
@@ -43,19 +43,16 @@ assert_eq!(supported,
4343
4444See [ docs.rs] [ ] for more examples.
4545
46- [ docs.rs ] : https://docs.rs/fluent-locale /
46+ [ docs.rs ] : https://docs.rs/fluent-langneg /
4747
4848Status
4949------
5050
51- The implementation is in early stage, but is complete according to fluent-locale
51+ The implementation is complete according to fluent-langneg
5252corpus of tests, which means that it parses, serializes and negotiates as expected.
5353
5454The negotiation methods can operate on lists of ` LanguageIdentifier ` or ` Locale ` .
5555
56- The ergonomics of Rust API can be improved, since the fallible nature of language identifier
57- parsing makes operating on lists of them tedious.
58-
5956The remaining work is on the path to 1.0 is to gain in-field experience of using it,
6057add more tests and ensure that bad input is correctly handled.
6158
@@ -84,7 +81,6 @@ implementations of language negotiation algorithms which may choose different
8481tradeoffs.
8582
8683[ BCP47 ] : https://tools.ietf.org/html/bcp47
87- [ Intl.Locale ] : https://github.com/tc39/proposal-intl-locale
8884[ RFC6067 ] : https://www.ietf.org/rfc/rfc6067.txt
8985[ UTS 35 ] : http://www.unicode.org/reports/tr35/#Locale_Extension_Key_and_Type_Data
9086[ RFC4647 ] : https://tools.ietf.org/html/rfc4647
@@ -105,16 +101,7 @@ For such purposes, [rust-language-tags][] crate seems to be a better choice.
105101Performance
106102-----------
107103
108- There has not been a significant performance work being done on the library yet,
109- so we expect there are some low hanging fruit waiting for someone to find them.
110-
111- At the moment performance is comparable to previously mentioned ` language-tags ` crate
112- for parsing a sample list of language tags based on this crate's benchmark code:
113-
114-
115- running 2 tests
116- test bench_locale(fluent-locale) ... bench: 1,773 ns/iter (+/- 48)
117- test bench_locale(language-tags) ... bench: 1,982 ns/iter (+/- 280)
104+ The crate is considered to be fully optimized for production.
118105
119106
120107Develop
0 commit comments