Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

Java Locale API not working on dev

Avatar

Level 7

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 7

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

Level 7

Site visitor country.

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