Office internationalized wickets

Is there a good / right way to support / administer the internationalization of a Wicket app?

Currently there are several * .properties files with translations in it, as in Wicket. Can you access them at runtime and change the values ​​so that the changes happen without restarting the application?

(Another way is to store the values ​​in a database, but I just leave it for now.)

+3
source share
2 answers

You can write your own implementation of IStringResourceLoader and register it in your application as follows:

getApplication().getResourceSettings().addStringResourceLoader(  
                                                     new CustomResourceLoader());

- WAR , , .

Wicket , :

getApplication().getResourceSettings().setResourcePollFrequency( 
                                                           Duration.seconds(1));
+4

, , :

  • . , JAR , .
  • , (, , )
  • " ". JavaScript HTML, "", . AJAX .

    , , , ( CSS , ) , ..

[EDIT]

WAR . WAR , .

WEB-INF/ ( ) script WAR.

/ script jar -u . ant WAR zipfileset, duplicate="preserve".

, .

+1

Source: https://habr.com/ru/post/1795188/


All Articles