How to internationalize a Java web application?

前端 未结 3 1841
野的像风
野的像风 2020-11-22 02:39

I learnt from Google that Internationalization is the process by which I can make my web application to use all languages. I want to understand Unicode for the process of i

3条回答
  •  天涯浪人
    2020-11-22 03:24

    In addition to what BalusC said, you have to take care about directionality (since English is written Left-To-Right and Arabic the other way round). The easiest way would be to add dir attribute to html element of your JSP web page and externalize it, so the value comes from properties file (just like with other elements or attributes):

    
    ...
    
    

    Also, there are few issues with styling such application - you should to say the least avoid absolute positioning. If you cannot avoid that for some reason, you could either use different stylesheets per (each?) language or do something that is verboten, that is use tables for managing layout. If you want to use div elements, I'd suggest to use relative positioning with "symmetric" left and right style attributes (both having the same value), since this is what makes switching directionality work.

    You could find more about Bi-Directional websites here.

提交回复
热议问题