• Post Reply Bookmark Topic Watch Topic
  • New Topic

What Is the Equivalent If I Do Not Want Internationalization  RSS feed

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have source code for accommodating internationalization using the ResourceBundle. I do not want to use internationlization.
Here is the source code:

If I leave out the internationalization part, should my code be:

Then, I do not know what is so essential about

Any consequences if I leave this statement out?
 
Jean-Francois Briere
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code you presented uses a configuration file.
It may be for internationalization purpose, as it may NOT be.
The point of the code is to use a file named mvnplugin_mvnforum_MVNForumConfig.properties
which holds configuration settings. This is a text file.
One setting of the file is "MVNFORUM_HOME".
this setting is already assigned to "mvnForumHome" by default in the code.
So if it is not set in the configuration file, it will have the default value.
To be set in the configuration file, the setting must be written as follows:
-- begin file ------------------------------------------
MVNFORUM_HOME=blablabla
-- end file --------------------------------------------
That gives users of the JAVA application the ability to change different settings
(by modifying the configuration file) without the need of re-building the application.
If you don't want that, if you want MVNFORUM_HOME hard coded with the same value allways,
you could simply write in your code:
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply and explanation. Which directory is the proper place for the configuration file? Where should I put
mvnplugin_mvnforum_MVNForumConfig.properties
For example, I am using Servlets and JSPs. This configuration file should be in the context root or in the WEB-INF directory for the code to pick it up?
 
Jean-Francois Briere
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The rule is to install the file in a location that is accessible by the class path.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ResourceBundle loads propertiesfiles using standard Java package naming conventions.
Place the file in WEB-INF/classes therefore and it should be picked up.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!