Giter Club home page Giter Club logo

nv-i18n's Introduction

nv-i18n

Overview

Package to support internationalization, containing ISO 3166-1 country code enum, ISO 639-1 language code enum, ISO 15924 script code enum, etc.

Class Description
CountryCode ISO 3166-1 country code.
LanguageCode ISO 639-1 language code.
LanguageAlpha3Code ISO 639-2 language code.
LocaleCode Available locales whose format match either 'xx' or 'xx-XX'.
ScriptCode ISO 15924 script code.
CurrencyCode ISO 4217 currency code.

License

Apache License, Version 2.0

Maven

<dependency>
    <groupId>com.neovisionaries</groupId>
    <artifactId>nv-i18n</artifactId>
    <version>1.22</version>
</dependency>

Gradle

dependencies {
    compile 'com.neovisionaries:nv-i18n:1.22'
}

OSGi

Bundle-SymbolicName: com.neovisionaries.i18n
Export-Package: com.neovisionaries.i18n;version="1.22.0"

Source Code

https://github.com/TakahikoKawasaki/nv-i18n.git

JavaDoc

http://TakahikoKawasaki.github.io/nv-i18n/

Example

// List all the country codes.
for (CountryCode code : CountryCode.values())
{
    System.out.format("[%s] %s\n", code, code.getName());
}

// List all the language codes.
for (LanguageCode code : LanguageCode.values())
{
    System.out.format("[%s] %s\n", code, code.getName());
}

// List all the locale codes.
for (LocaleCode code : LocaleCode.values())
{
    String language = code.getLanguage().getName();
    String country  = code.getCountry() != null
                    ? code.getCountry().getName() : null;

    System.out.format("[%s] %s, %s\n", code, language, country);
}

// List all the script codes.
for (ScriptCode code : ScriptCode.values())
{
    System.out.format("[%s] %03d %s\n", code, code.getNumeric(), code.getName());
}

// List all the currency codes.
for (CurrencyCode code : CurrencyCode.values())
{
    System.out.format("[%s] %03d %s\n", code, code.getNumeric(), code.getName());
}

See Also

TODO

  • To add missing entries to CountryCode.
  • To add international telephone dial number.

Note

This nv-i18n supersedes https://github.com/TakahikoKawasaki/CountryCode

Author

Takahiko Kawasaki, Authlete, Inc.

nv-i18n's People

Contributors

takahikokawasaki avatar xzer avatar gundalf72 avatar

Watchers

James Cloos avatar Igor Orlov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.