Expand my Community achievements bar.

Java Locale API not working on dev

Avatar

Level 6

Hi Folks,

 

I am facing one issue. Our requirement is to get current country name in sling model. java.util.Locale API is not working in dev. However it is working on local AEM instance AEM6.5 SP13.

Is there any known issue in AEM6.5 SP13 (set up on amazon AWS cloud) will not work?

Is there any open source API adobe recommend to use to get current country in sling model?

 

Appreciate any pointer on this.

 

Thanks,

Pradeep

5 Replies

Avatar

Employee Advisor

how do you define" current locale" in the context of your application?

Avatar

Level 6

Actually we need to fetch site visitor country in sling model. I could not see any request header which is giving site visitor country name. Please advise.

Avatar

Employee Advisor

you mean the country the visitor is originating from? Or the locale of the country site (domain) the visitor is accessing?

Avatar

Employee Advisor

Ok, can you share the code which is not working? My gut feeling is that on that DEV environment you have a dispatcher in front of AEM, and you are trying to fetch the country of the visitor based on the IP address of the requester. A