• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[Wicket] Localization of page layout

 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As a sort of continuation of this earlier question, I'd be curious to hear what kind of an approach should one take with Wicket to support layout-level localization, e.g. when bits of the page need to be positioned to a different place for certain locales or when text content needs to flow right-to-left for Arabic users?
 
author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:
As a sort of continuation of this earlier question, I'd be curious to hear what kind of an approach should one take with Wicket to support layout-level localization, e.g. when bits of the page need to be positioned to a different place for certain locales or when text content needs to flow right-to-left for Arabic users?



So the easiest and often preferable way to go for localization is to use constructs like <wicket:message>. However, is that is not sufficient, you can take advantage of the way Wicket loads resources. For instance if you'd have MyPage.html and MyPage_nl.html and the user's locale is nl_NL, the MyPage_nl.html would be loaded.

See for instance the org.apache.wicket.examples.pub and org.apache.wicket.examples.pub2 examples for an illustration on this, and see org.apache.wicket.examples.forminput where this is used for just images (the flag icon).
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what's the role of (and relationship between) borders and markup inheritance in all of this?
 
Eelco Hillenius
author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:
So what's the role of (and relationship between) borders and markup inheritance in all of this?



They abide the same rules of markup loading, but have no special meaning for localization. Though you could use it for that if you implement e.g. borders in a locale specific way.
 
author
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:
So what's the role of (and relationship between) borders and markup inheritance in all of this?



Wicket favors the markup specific to a locale over the generic one. If you have:

BasePage.html
BasePage_fi.html

and

ConcretePage.html
ConcretePage_fi.html
ConcretePage_nl.html

and a user with local fi comes along, he'll get ConcretePage_fi.html and BasePage_fi.html, if a dutch guy with locale nl comes along, he'll get ConcretePage_nl.html and BasePage.html. If someone else comes along with a different locale, they'll get the non-localized pages.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lasse, i have question for You. What You can say about Wicket testability? Did You have any problems, with Wicket's mocks for example? Because, i did. Maybe, You can write tutorial about this
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I only have a limited first-hand experience with Wicket (although it's extensively used at Reaktor) but, having said that, I've found Wicket quite easy to work with, testing-wise.

Part of this is thanks to the built-in support in the form of WicketTester and part of it is thanks to WicketBench, an Eclipse plugin originated by my colleague, Joni Freeman.
 
Tomasz Prus
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found problem with testing during test form fields validation, some strange issues with ResquestCycle but maybe i forget about something and don't understand everything yet.
My cousine Jakub Jarvenpaa works in Reactor. If You will see him ask him why don't answer for my emails. He promise that send me one "Test Driven" book with Your autograph

I know TDD and Wicket from Jakub. He introduce me in Java programming. Everything he learnt me I implement in our company in Poland.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What a small world! Now that you mentioned Jakub, I vaguely remember him telling about his cousin in Poland who's also in IT - that must've been you, then
 
reply
    Bookmark Topic Watch Topic
  • New Topic