ChromeI18n class

Properties

hashCode int
The hash code for this object.
no setterinherited
isAvailable bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

detectLanguage(String text) Future<DetectLanguageCallbackResult>
Detects the language of the provided text using CLD. text User input string to be translated.
getAcceptLanguages() Future<List<String>>
Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage.
getMessage(String messageName, Object? substitutions, GetMessageOptions? options) String
Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong - for example, messageName is not a string or the substitutions array has more than 9 elements - this method returns undefined. messageName The name of the message, as specified in the messages.json file. substitutions Up to 9 substitution strings, if the message requires any. returns Message localized for current locale.
getUILanguage() String
Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages. returns The browser UI language code such as en-US or fr-FR.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited