3 releases

0.1.2 Aug 19, 2022
0.1.1 Jun 23, 2022
0.1.0 Jun 21, 2022

#241 in Internationalization (i18n)

Download history 11/week @ 2024-02-22 8/week @ 2024-02-29 3/week @ 2024-03-07 2/week @ 2024-03-14 33/week @ 2024-03-28 21/week @ 2024-04-04

54 downloads per month

MIT license

20KB
198 lines

Country name normalization library

Convert country names and codes to a standard.

Usage example

let cn = CountryNameNormalizer::new("./countries/en.toml").unwrap();
let st_kittis_nevis = cn.normalize_country("St. Kitts & Nevis").unwrap();

println!("{:?}", st_kittis_nevis)

//
// Country {
//   aliases: Some(["Federation of Saint Christopher and Nevi"]),
//   alpha2: "KN",
//   alpha3: "KNA",
//   fifa: "SKN",
//   ioc: "SKN",
//   iso_name: "Saint Kitts And Nevis",
//   numeric: 659,
//   official: "Federation of Saint Kitts and Nevis",
//   short: "Saint Kitts And Nevis",
//   emoji: "🇰🇳",
//   shortcode: ":flag-kn:",
// }

Dependencies

~2.7–4.5MB
~82K SLoC