Skip to content

Commit 8711c27

Browse files
committed
Update README
1 parent 40957e7 commit 8711c27

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Introduction
1111

1212
This is a Rust implementation of fluent-langneg library which is a part of Project Fluent.
1313

14-
The 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.
14+
The library uses [icu-locid](https://github.com/unicode-org/icu4x) to retrieve and operate on Unicode Language and Locale Identifiers.
1515
The library provides algorithm for negotiating between lists of locales.
1616

1717
Usage
@@ -21,13 +21,14 @@ Usage
2121
use fluent_langneg::negotiate_languages;
2222
use fluent_langneg::NegotiationStrategy;
2323
use fluent_langneg::convert_vec_str_to_langids_lossy;
24-
use unic_langid::LanguageIdentifier
24+
use fluent_langneg::LanguageIdentifier;
2525

2626
// Since langid parsing from string is fallible, we'll use a helper
2727
// function which strips any langids that failed to parse.
2828
let requested = convert_vec_str_to_langids_lossy(&["de-DE", "fr-FR", "en-US"]);
2929
let available = convert_vec_str_to_langids_lossy(&["it", "fr", "de-AT", "fr-CA", "en-US"]);
30-
let default: LanguageIdentifier = "en-US".parse().expect("Parsing langid failed.");
30+
let default: LanguageIdentifier = "en-US".parse()
31+
.expect("Parsing langid failed.");
3132

3233
let supported = negotiate_languages(
3334
&requested,

examples/negotiate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use fluent_langneg::negotiate::NegotiationStrategy;
22
use fluent_langneg::{convert_vec_str_to_langids_lossy, negotiate_languages};
33

44
fn main() {
5-
let requested = convert_vec_str_to_langids_lossy(&["it", "pl", "ru"]);
6-
let available = convert_vec_str_to_langids_lossy(&["fr", "en-GB", "en-US", "ru", "pl"]);
5+
let requested = convert_vec_str_to_langids_lossy(["it", "pl", "ru"]);
6+
let available = convert_vec_str_to_langids_lossy(["fr", "en-GB", "en-US", "ru", "pl"]);
77
let supported =
88
negotiate_languages(&requested, &available, None, NegotiationStrategy::Filtering);
99

0 commit comments

Comments
 (0)