I am currently using 6.0 version
of hybris. Our project is entirely based on Backoffice. Earlier We configured in_ID
(languageISOcode_countryISOcode
) for indonesia locale and was working fine but now Client has requested to do the locale setup as id_ID
for Indonesia locale.
Please note, in languageISOcode
is deprecated and id is the updated languageISOcode
of Indonesia.
Below is the snippet of code in our hybris:
final Locale locale = cockpitLocaleService.getCurrentLocale();
LOG.info("locale : " + locale); //Here I'm getting in_ID value of locale in all scenario
It is calling Locale.class file of java and If I pass id_ID
then also convertOldISOCodes
method(inside Locale.class
) is converting id_ID
to in_ID
.
See the code below :
import java.util.Locale;
Locale localeIndonesia = new Locale("id", "ID");
System.out.println(localeIndonesia); //printed in_ID
Could you please help me to get id_ID
as locale for Indonesia.
OR
If it's a bug in Java then Is there any way to get id_ID in hybris ?
toLanguageTag()
returningid-ID
for bothLocale.forLanguageTag("id-ID")
andLocale.forLanguageTag("in-ID")
– Lashay