iOS - Access Localization
note
Modules conforming to the Module
interface can access an instance of ModuleDataSource
via the moduleDataSource
property.
Use this instance to retrieve localized strings from Q2MobileCore
. :::
To retrieve a localized string from Q2MobileCore
, use the L10Provider
available
through the localization
property in the ModuleDataSource
interface.
Access Localized String
Use the following code snippet to access a localized string for a given key. If the key
does not exist, it will return nil
.
Accessing Localized String
let localizedString = moduleDataSource?.localization?.localizedString(forKey: "localization-key")
Documentation will be updated with the set of available localization keys. :::