Tutorial: Internationalize ZK Web Applications (Part 2)

In part 1 (link) we created a multi language supporting web application with the ZK Ajax framework. Out-of-the box it will follow the browser’s default or preferred language which is perfect assuming 1 user would always use the same desktop with the same browser. But what happens if you create an application that is used by different users on public browsers or in an office/production environment with shared work stations (web kiosk). The preference page might not be accessible, and 90% of users won’t even know how or are not very excited to change the browsers preferences to have their own language displayed. Did you try to change it before ? Firefox: Go to edit|preferences|Language choose..| select (add) you language and move it to the top. You want to change it back ? Go there again and….. This is not WEB 2.0 !

What we need is the application to change the language on the fly, and even better store it as a user preference if you use accounts.

We continue with the application from part 1.

Continue reading

Tutorial: Internationalize ZK Web Applications (Part 1)

I would say internationalization is a key feature in any software that is (potentially) used in different countries or user with different languages. You dont want to inject this feature at the end of your implementation but put in place right at the beginning. Using todays framework is not a big deal to hook on the browsers locale settings and make an application speaking that language (if it is provided, otherwise fall back into the default language). I found 2 tutorials for the ZK Ajax framework covering internationalization (link1, link2), I will add another approach here, focusing on the separation of zul page (viewer) and its controller.


  • Netbeans 6.8
  • Glassfish V3 Application Server
  • Installed ZK Plugin for Netbeans (link)

(Older Versions and non-EE6 work as well, Internationalization is not a Java EE6 specific feature)

Continue reading