[LIB] Get device language

Howdy ho !

Another day, another open source code released :smiley: today i’m bringing you a small library that get’s you the user language in the device. works on html5, android and iOS target. first lib i release in haxelib too :smiley:

here is all the instructions:

pretty straightforward and simple use :smiley:

With love, from Ipsilon Developments Inc. :smiley:

2 Likes

Would you be interested in contributing this to improvements to Capabilities.language?

no problem but i don’t know how is the structure in the core of openFL to integrate native code (where i should write it or integrate the java and objective-c code), unfortunately, for android and iOS requires native code to get the locale.

Native code goes into Lime, so we would just decide where that goes, perhaps lime.system.System.languageCode or something

For OpenFL “next” (in the openfl/* class path) it would just call the Lime API internally. For OpenFL “v2” (in the openfl/_v2/* class path) it uses the Lime “legacy” binaries, which is hosted in Lime’s “legacy” folder

understood :smiley: let me check the code and i’ll build a pull request on this week most probably :smiley: