Bioruebe / devicelanguage

simple openfl lib to get the device language (supporting ios, android and html5 for now)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Device Language

Simple extension for OpenFL that returns the language of the device where the app is running. Supporting currently HTML5, Flash, Windows, Linux, iOS and Android targets (contribution for missing targets is welcome)

With love from:

Ipsilon Developments Inc. released under MIT license

Like our Facebook page to get news about our releases

Or Follow us on Twitter

You can also contact us at info [AT] ipsilondev.com

How to use

First of all, install the lib:

haxelib install devicelanguage

Once this is done, you just need to add this to your project.xml

<haxelib name="devicelanguage" />

then from haxe, just do:

// This example show a simple use case.

import extension.devicelang.DeviceLanguage;

var lang:String = DeviceLanguage.getLang();

returns a string representing the language in ISO-639-1 format for Flash, Windows, Linux, Android and iOS target and in similar way, for html5 target, just that also includes the country (for example, Android would return "en" for english, and in html5 could return "en-US")

About

simple openfl lib to get the device language (supporting ios, android and html5 for now)

License:MIT License


Languages

Language:C++ 48.3%Language:Haxe 40.8%Language:Objective-C++ 11.0%