Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.jgarbora:nv-i18n:1.30'
}
dependencies {
implementation("com.github.jgarbora:nv-i18n:1.30")
}
<dependency>
<groupId>com.github.jgarbora</groupId>
<artifactId>nv-i18n</artifactId>
<version>1.30</version>
</dependency>
libraryDependencies += "com.github.jgarbora" % "nv-i18n" % "1.30"
:dependencies [[com.github.jgarbora/nv-i18n "1.30"]]
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. |
Apache License, Version 2.0
<dependency>
<groupId>com.neovisionaries</groupId>
<artifactId>nv-i18n</artifactId>
<version>1.23</version>
</dependency>
go to https://jitpack.io/ for build a package using github then :
<dependency>
<groupId>com.github.jgarbora</groupId>
<artifactId>nv-i18n</artifactId>
<version>87733a1042</version>
</dependency>
Bundle-SymbolicName: com.neovisionaries.i18n
Export-Package: com.neovisionaries.i18n;version="1.23.0"
<code>https://github.com/TakahikoKawasaki/nv-i18n.git</code>
<code>http://TakahikoKawasaki.github.io/nv-i18n/</code>
// 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());
}
This nv-i18n supersedes https://github.com/TakahikoKawasaki/CountryCode
Takahiko Kawasaki, Authlete, Inc.
https://jitpack.io/