language-code 0.3.0

Language Code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// cargo expand --verbose --all-features --test macro_language_tag

use country_code::iso3166_1::alpha_2::CountryCode;
use language_code::iso639_1::LanguageCode;

language_code::language_tag! {
    #[derive(Debug, Clone)]
    pub struct MyLanguageTag {
        pub language_code: LanguageCode,
        pub country_code: Option<CountryCode>,
    }
}