• Get Current Language in JavaCode

  • Help us to spread the OpenKM word translating the applicacion to your preferrd language.
Help us to spread the OpenKM word translating the applicacion to your preferrd language.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #30577  by mrmasoud
 
Hi,

How can I get current Language in Java Source Code of openKM?

I am trying
Code: Select all
Locale locale = pageContext.getRequest().getLocale();
String lang = locale.getLanguage() + "-" + locale.getCountry() + "(" +locale.getDisplayLanguage() + ")";
but this code always shows "en-US(English)"
 #30588  by jllort
 
UI Language is stored on session, do it
Code: Select all
request.getSession().getAttribute("lang");
The Language is saved into LanguageServlet.java what is called just before the UI starting.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.