GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TakahikoKawasaki/nv-i18n: Package to support internationalization, containing ISO 3166-1 country code enum, ISO 639-1 language code enum, etc.

BranchesTags
Open more actions menu

Latest commit

 

History

203 Commits
203 Commits

Folders and files

NameName
Last commit message
Last commit date
.settings
.settings
 
 
src
src
 
 
.classpath
.classpath
 
 
.gitignore
.gitignore
 
 
.project
.project
 
 
CHANGES.md
CHANGES.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

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.29</version>
</dependency>

Gradle

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

OSGi

Bundle-SymbolicName: com.neovisionaries.i18n
Export-Package: com.neovisionaries.i18n;version="1.28.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

  • nv-i18n @ GitHub
  • Country Code ISO 3166-1
  • Country Code ISO 3166-1 alpha-2
  • Country Code ISO 3166-1 alpha-3
  • Country Code ISO 3166-1 numeric
  • Language Code ISO 639-1
  • Language Alpha3 Code ISO 639-2
  • Script Code ISO 15924
  • Currency Code ISO 4217

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.

About

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

Resources

Readme
Apache-2.0 license
Activity

Stars

411 stars

Watchers

19 watching

Forks

134 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.