vy_language_tag 0.2.1 copy "vy_language_tag: ^0.2.1" to clipboard
vy_language_tag: ^0.2.1 copied to clipboard

A representation of a language tag as per IETF BCP 47 specs. It can be used in translation functions.

Language Tag Representation #

LanguageTag is a class used for generating and checking language tags. The language tag follows the IETF BCP 47 specifications.

It can create a language Tag given all the subtags that are part of it or parsing an existing languageTag String.

The implementation is not yet complete, but it should be enough for the majority of cases

What is missing #

  • There is no control on the values inserted, except for the length (and position). This will be fixed in a future release.
  • The extension and private use subtags are not managed yet.

License

license.

Usage #

A simple usage example:

import 'package:vy_language_tag/vy_language_tag.dart';

main() {
  var languageTag = LanguageTag('en', region: 'US');
  print(languageTag.code);   // 'en-US'
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
130
pub points
32%
popularity

Publisher

unverified uploader

A representation of a language tag as per IETF BCP 47 specs. It can be used in translation functions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

vy_string_utils

More

Packages that depend on vy_language_tag