Skip to Content
avatar image
Former Member

Syntax in Java for taking client Language

Hello All , How to do validation based on Agentry client Language in JAVA. Can you provide syntax to capture client langauge . Ex : if Client Language nl then { Need to run V1 } if Client Language Fr then { Need to run V2 } Can you provide some suggestion on it ? Thanks & Regards, Kunal Varaiya

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 09, 2015 at 11:31 AM

    Hi Kunal,

    By using java.util.Locale you can get the default language of your device.

    Syntax :Locale.getDefault().getLanguage();

    Hope this will help.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Tiru , Thanks for your replay... let me check and will update you . Thanks & Regards, Kunal Varaiya

  • Feb 09, 2015 at 01:20 PM

    Hello,

    You could try using below:

    String lang = _user.getClientDeviceLanguage();

    Thanks

    Resmi

    Add comment
    10|10000 characters needed characters exceeded