I am currently using toLanguageTag()
to get locale code but it gives the locale code which contains dash -
, my requirement is to basically return the same data but it should contain underscore _
, is there a way we can achieve it without using toString()
methods and string replacement?
this document says use toString()
for debugging purpose.