NationsTrans extension

string translation extension

on

Properties

gender String
  • translate a text AND use the default gender
  • if there is error will use the config notFoundGender
  • no setter
    tr String
  • translate a text based on the App locale
  • if there is error will use the config notFound
  • no setter
    trFemale String
  • translate a text AND use the female gender
  • if there is error will use the config notFoundGender
  • no setter
    trMale String
  • translate a text AND use the male gender
  • if there is error will use the config notFoundGender
  • no setter

    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