javascript - Using the languagefile to populate the "ok" button for the AlertDialog in Android using Titanium -


so tried creating alertdialog, ok button coming language file, when that, fails render button using code.

var dialog = ti.ui.createalertdialog({     message: l('timeouterrormessage'),     title: l('timeouterrortitle'),     ok: l('okbutton') }) 

same story when use buttonnames, , okid

var dialog = ti.ui.createalertdialog({     message: l('timeouterrormessage'),     title: l('timeouterrortitle'),     buttonnames: [l('okbutton')] }); 

but when plainly put in text, works fine:

var dialog = ti.ui.createalertdialog({     message: l('timeouterrormessage'),     title: l('timeouterrortitle'),     buttonnames: ['okay'] // (or ok: 'okay') }); 

how can work using language file?

i'm afraid can't use i18n functions alertdialog @ time. there few relevant tickets, encourage watch (more watchers == higher priority during triaging).

there's alloy-specific ticket: https://jira.appcelerator.org/browse/aloy-853 manifestation of related sdk ticket https://jira.appcelerator.org/browse/timob-14763

there's https://jira.appcelerator.org/browse/timob-17205 covering parity difference between how ios & android handle missing or invalid i18n key names. titanium on ios outputs key name if missing/invalid; android outputs empty string. so, button there result of code, no text , therefore invisible.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -