me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Language configuration #271

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a little problem, we are a Chinese team, we  want to use English version 
of JavaMelody, but the language setting of all our browsers is Chinese. Is it 
possible to make the language of JavaMelody to configurable? For example, we 
can have an additional parameter for monitoring filter in web.xml, or we can 
have a language selection in the index page. 

If you do not mind, I hope I can make a patch for this function.

Original issue reported on code.google.com by xiukongt...@gmail.com on 18 Dec 2012 at 11:42

GoogleCodeExporter commented 9 years ago
This is an enhancement.

If there would be a language selection in the main report page, it would 
probably need a persistent cookie like for the choosen period.
But what would be the locale including the language and the country? (The 
locale, and in particular the country, changes the date formats and the number 
formats in the reports).
The need to select again the language or locale in each dev/qa/prod environment 
is not the best option either.

Given that a language / locale selection would not be so usable, I think it is 
better to add a javamelody parameter. This would need to change the enum 
"Parameter" and the method "I18N#getCurrentLocale()"

Original comment by evernat@free.fr on 19 Dec 2012 at 1:33

GoogleCodeExporter commented 9 years ago
Here is a patch to make the language configurable.

Original comment by xiukongt...@gmail.com on 24 Dec 2012 at 1:39

Attachments:

GoogleCodeExporter commented 9 years ago
I have enhanced your patch to be able to set a locale (for example, "en_US", 
"en", "fr_FR", "de_DE" or "pt_BR") and not only a language.
And I have renamed the javamelody parameter to "locale".
It can be set like the others optional parameters:
http://code.google.com/p/javamelody/wiki/UserGuide#6._Optional_parameters

It is committed in trunk (revision 3202) and ready for the next release (1.43).
I have made a new build and it is available at:
http://javamelody.googlecode.com/files/javamelody-20121225.jar

Thanks

Original comment by evernat@free.fr on 25 Dec 2012 at 2:44