Question

I am using Messagebox.show() in my application .But my issue is that our application support bilingual just english and french .I use pageResourceBundle.getText() for bilingual support in my code "CONFIRMATION_MSG" work fine for bilingual but the Messagebox.YES | Messagebox.NO button can not change english to french .

Here's example :

Messagebox.show(pageResourceBundle.getText("CONFIRMATION_MSG"), pageResourceBundle.getText("ALERT"), Messagebox.YES | Messagebox.NO,
                    Messagebox.QUESTION, new org.zkoss.zk.ui.event.EventListener<Event>() {
                        public void onEvent(Event evt) throws InterruptedException {
                            if (evt.getData().equals(Messagebox.YES)) {
//code here

}

Anyone have any idea how to implement in the Messagebox.YES | Messagebox.NO button to bilingual .

Thanks

Was it helpful?

Solution

Zk already support the bilangual in the messagebox. You just have to set you Locale to the right one.

Why don't you use the provided i18n in zk?

http://books.zkoss.org/wiki/ZK_Developer's_Reference/Internationalization/Labels

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top