I am trying to apply jQuery Validation plugin into dhis2 india branch.
For showing the error messages in different languages, I need a language code. But could not find this code anywhere. So what I did is adding this method into “I18n” class:
have a look at the LocaleManager, you can find the interface in the api and the impl in dhis-i18n-static (UserSettingLocaleManager), bean id is org.hisp.dhis.i18n.locale.LocaleManager. It provides a method getCurrentLocale() which returns the java.util.Locale currently in use based on the user setting, and returns the default locale if no user setting exists.
I am trying to apply jQuery Validation plugin into dhis2 india branch.
For showing the error messages in different languages, I need a language code. But could not find this code anywhere. So what I did is adding this method into “I18n” class: