Gettext class
Class for translating strings using gettext textdomains.
Properties
-
catalogs
→ Map<
String, Catalog> -
final
- domain → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale ↔ String
-
Returns current locale
getter/setter pair
- onWarning → OnWarning?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addLocale(
Map< String, dynamic> data, {String domain = 'messages'}) → void - Adds new locale to gettext
-
addTranslations(
String locale, Map< String, dynamic> translations, {String domain = 'messages'}) → void - Stores a set of translations in the set of gettext catalogs.
-
gettext(
String msgid, {String? domain, String msgctxt = ''}) → String - Translates a string using the default textdomain
-
ngettext(
String msgid, String msgidPlural, int count, {String? domain, String msgctxt = ''}) → String - Translates a plural string using the default textdomain
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCatalog(
String locale, Catalog catalog) → void -
Load ready to use
catalog
for thelocale
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getLanguageCode(
String locale) → String - Returns the language code part of a locale