TranslationsProvider
public protocol TranslationsProvider
Protocol that describes how translations are fetched.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Returns a localized string from a localization table (
Localizable.strings
).Declaration
Swift
func translation(forKey key: String) -> String
Parameters
key
The key for a string in the translation table.
Return Value
Returns a localized version of the string designated by the specified key. The method returns empty string if key not found in the table.