MyApp.Cldr.Territory.translate_territory-exclamation-mark
You're seeing just the function
translate_territory-exclamation-mark
, go back to MyApp.Cldr.Territory module for more information.
Link to this function
translate_territory!(localized_string, from_locale, to_locale, style)
View SourceSpecs
translate_territory!( binary(), Cldr.Territory.binary_tag(), Cldr.Territory.binary_tag(), atom() ) :: binary() | no_return()
The same as translate_territory/3
, but raises an exception if it fails.
Example
iex> MyApp.Cldr.Territory.translate_territory!("Reino Unido", "pt")
"United Kingdom"
iex> MyApp.Cldr.Territory.translate_territory!("United Kingdom", "en", "pt")
"Reino Unido"
#=> MyApp.Cldr.Territory.translate_territory!("Westworld", "en", "pt")
** (Cldr.UnknownTerritoryError) No territory translation for "Westworld" could be found in locale "en"