Android Question Device default language

udg

Expert
Licensed User
Longtime User
Hi all,

I'm sure this is a really easy one, but can't figure out where to discover the language set on the device.
What I need is a simple international code, like "en", "de".. so I hope to find an answer in the core library or whatever is "linked" anyway to my app so to keep its size to a minimum.
I'm aware of the AndroidResource library, but for project at hand I don't need all that support.

TIA

Umberto
 

udg

Expert
Licensed User
Longtime User
Hi Erel,
thank you very much.
Reading the thread you pointed me to and the related AHLocale library thread I can solve my problem.

But I have a more general question: when linking a library to an app, is there any optimization magic that takes in account only those parts of the library that your app is effectively using?
Staying with tha AHLocale library example: my app using the ISO3Language variable provided by object AHLocale, does link the whole library or just the part containing that object? If the former, the more libraries you use the bigger your app grows to (I personally don't like monstruos megabytes apps and programs in general, surely due to my old-days programming with few Kbytes of RAM!).

Thank you for you attention.

Umberto
 
Upvote 0
Top