toLocale method

Language toLocale()

Parses the text to Language. The input text must, at a minimum be a valid language tag string (e.g. 'us'), or a fully qualified string representation of a Language.

Implementation

Language toLocale() => Language.fromSubtags(
    languageCode: languageSubTag,
    countryCode: countrySubTag,
    scriptCode: scriptSubTag,
    validateTags: false);