If your license includes multiple languages you may need to provide a localized disposition for any custom dispositions. You can do this by providing an object instead of a string of text. The object should have support locale language codes as the top level keys, with the text in that language as their values.
var localizedDisposition = {
en: 'Visit AppCatalyst Doctor Now',
es: 'Visita a AppCatalyst Doctor Now',
'fr-CA': 'Visitez AppCatalyst Doctor Now'
}
SCWebCore.triage.setCustomDisposition(90, localizedDisposition)
Example Implementation
Localized strings should be provided to all custom disposition text defined in SCWebCore.triage.setCustomDisposition
. The ideal place in the example implementation to take care of this is in app/config.js.
The specified format for defining localized strings for disposition text is as follows, where each property is supplied a key: value pair of translations using the supported locale codes (defined in SCWebCore.locale.SupportedLocales
) as the key:
{
en: 'Custom English disposition',
es: 'Personalización a la inglesa',
'fr-CA': 'Disposition anglaise personnalisée'
}
In Overriding Disposition Text we add custom dispositions in app/config.js
. In order to support alternate languages, we are required to provide localized strings for text
as shown below:
angular.module('core').run(['SCWebCore', function(SCWebCore) {
var localizedDisposition = {
en: 'Visit AppCatalyst Doctor Now',
es: 'Visita a AppCatalyst Doctor Now',
'fr-CA': 'Visitez AppCatalyst Doctor Now'
}
SCWebCore.triage.setCustomDisposition(90, localizedDisposition)
}])