NationsTrans extension Null safety
string translation extension
- on
Properties
- gender → String
-
- translate a text AND use the default gender
- if there is error will use the config
notFoundGender
read-only - tr → String
-
- translate a text based on the App locale
- if there is error will use the config
notFound
read-only - trFemale → String
-
- translate a text AND use the
female
gender- if there is error will use the config
notFoundGender
read-only - translate a text AND use the
- trMale → String
-
- translate a text AND use the
male
gender- if there is error will use the config
notFoundGender
read-only - translate a text AND use the
Methods
-
args(
Map< String, Object> args) → String -
- translate a text and replace the args with provided data
- if there is error will use the config
notFoundArgs
-
plural(
int count, [Map< String, Object> args = const {}]) → String -
- translate a text and set the right word base on the provided count
- if there is error will use the config
notFoundPlural
-
toLocale(
[Locale? locale]) → String - covert the number to locale format if none locale givin it will use the current locale