-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some extra support for unknonw language codes.
- Loading branch information
Showing
6 changed files
with
211 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
src/main/java/org/meeuw/i18n/languages/UserDefinedLanguage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package org.meeuw.i18n.languages; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
public class UserDefinedLanguage implements LanguageCode { | ||
|
||
private static final Map<String, UserDefinedLanguage> registered = new ConcurrentHashMap<>(); | ||
|
||
private final String code; | ||
private final Type type; | ||
private final String refName; | ||
private final String comment; | ||
|
||
public UserDefinedLanguage(String code, Type type, String refName, String comment) { | ||
this.code = code; | ||
this.type = type; | ||
this.refName = refName; | ||
this.comment = comment; | ||
} | ||
|
||
|
||
@Override | ||
public String code() { | ||
return code; | ||
} | ||
|
||
@Override | ||
public String part3() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String part2B() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String part2T() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String part1() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Scope scope() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Type languageType() { | ||
return type; | ||
} | ||
|
||
@Override | ||
public String refName() { | ||
return refName; | ||
} | ||
|
||
@Override | ||
public String comment() { | ||
return comment; | ||
} | ||
|
||
@Override | ||
public List<NameRecord> nameRecords() { | ||
return List.of(); | ||
} | ||
|
||
@Override | ||
public List<LanguageCode> macroLanguages() { | ||
return List.of(); | ||
} | ||
|
||
@Override | ||
public List<LanguageCode> individualLanguages() { | ||
return List.of(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters