From 4061a55e2d4e3a83027344cbbb18e8014ff75232 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sat, 14 Sep 2013 16:53:05 +0200 Subject: [PATCH] Add Locale management. --- .../xidyn/presenters/TranslatorPresenter.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/fr/devinsy/xidyn/presenters/TranslatorPresenter.java b/src/fr/devinsy/xidyn/presenters/TranslatorPresenter.java index 41e4daa..afe2220 100644 --- a/src/fr/devinsy/xidyn/presenters/TranslatorPresenter.java +++ b/src/fr/devinsy/xidyn/presenters/TranslatorPresenter.java @@ -269,6 +269,31 @@ public class TranslatorPresenter implements Presenter return false; } + /** + * + */ + public String toString(final Locale locale) throws Exception + { + String result; + + // + String language; + if (locale == null) + { + language = null; + } + else + { + language = locale.getLanguage(); + } + + // + result = toString(language); + + // + return result; + } + /** * */