Java Code Examples for java.util.Locale#TAIWAN

The following examples show how to use java.util.Locale#TAIWAN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestNonIsoFormatter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 2
Source File: TestNonIsoFormatter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 3
Source File: TestNonIsoFormatter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 4
Source File: TestNonIsoFormatter.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 5
Source File: TestNonIsoFormatter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 6
Source File: LocalManageUtil.java    From smart-farmer-android with Apache License 2.0 6 votes vote down vote up
/**
 * 获取选择的语言设置
 *
 * @return
 */
public static Locale getSetLanguageLocale() {
    int language = Arad.preferences.getInteger(Constants.P_SETTING_LANGUAGE, -1);

    switch (language) {
        case 0:
            return Locale.CHINESE;
        case 1:
            return Locale.TAIWAN;
        case 2:
            return Locale.ENGLISH;
        case 3:
            return Locale.JAPANESE;
        case 4:
            return Locale.KOREAN;
        default:
            return getSystemLocale();
    }
}
 
Example 7
Source File: TestNonIsoFormatter.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 8
Source File: TestNonIsoFormatter.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 9
Source File: TestNonIsoFormatter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 10
Source File: TestNonIsoFormatter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5\u6708\u66dc\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c \u0661 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631\u060c \u0661\u0664\u0663\u0664 \u0647\u0640" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5 \u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 11
Source File: CLDRTimeZoneNameProviderImpl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private Locale mapChineseLocale(Locale locale) {
    if (locale.getLanguage() == "zh") {
        switch (locale.getScript()) {
            case "Hans":
                return Locale.CHINA;
            case "Hant":
                return Locale.TAIWAN;
            case "":
                // no script, guess from country code.
                switch (locale.getCountry()) {
                    case "":
                    case "CN":
                    case "SG":
                        return Locale.CHINA;
                    case "HK":
                    case "MO":
                    case "TW":
                        return Locale.TAIWAN;
                }
                break;
        }
    }

    // no need to map
    return locale;
}
 
Example 12
Source File: AttestationResult.java    From SecuritySample with Apache License 2.0 6 votes vote down vote up
public String getFormattedString() {
    StringBuilder sb = new StringBuilder();
    if (getApkCertificateDigestSha256().length > 0) {
        sb.append("[");
        for (String s : getApkCertificateDigestSha256()) {
            sb.append(s);
            sb.append(", ");
        }
        sb.delete(sb.length() - 2, sb.length());
        sb.append("]");
    }
    SimpleDateFormat newFormat = new SimpleDateFormat(
            "yyyy/MM/dd hh:mm:ss", Locale.TAIWAN);
    String formattedTime = newFormat.format(getTimestampMs());
    return String
            .format("Request Time:\n%s\n\nNonce:\n%s\n\nPackageName:\n%s\n\nextension:\n%s\n\nApkCertificateDigestSha256:\n%s\n\nApkDigestSha256:\n%s\n\nctsProfileMatch:\n%s\n\nbasicIntegrity:\n%s",
                    formattedTime, getNonce(), getApkPackageName(),
                    getExtension(), sb.toString(), getApkDigestSha256(),
                    isCtsProfileMatch(), isBasicIntegrity());
}
 
Example 13
Source File: TestNonIsoFormatter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 14
Source File: TestNonIsoFormatter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 15
Source File: TestNonIsoFormatter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 16
Source File: TestNonIsoFormatter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
Example 17
Source File: ExampleUnitTest.java    From android with MIT License 5 votes vote down vote up
@Test
public void testStringLocale() throws Exception {
    Locale[] locales = new Locale[]{
            Locale.CANADA,
            Locale.CANADA_FRENCH,
            Locale.CHINESE,
            Locale.ENGLISH,
            Locale.FRANCE,
            Locale.GERMAN,
            Locale.GERMANY,
            Locale.ITALIAN,
            Locale.ITALY,
            Locale.JAPAN,
            Locale.JAPANESE,
            Locale.KOREA,
            Locale.KOREAN,
            Locale.PRC,
            Locale.ROOT,
            Locale.SIMPLIFIED_CHINESE,
            Locale.TAIWAN,
            Locale.TRADITIONAL_CHINESE,
            Locale.UK,
            Locale.US
    };

    String weightString = null;
    for (Locale locale : locales) {
        try {
            weightString = formatFloatWithOneDot(locale, 55.4f);
            float weight = Float.parseFloat(weightString);
        } catch (NumberFormatException e) {
            System.out.println(locale + ">>>>>" + weightString + ">>>>>>>>>> error");
            continue;
        }
        System.out.println(locale + ">>>>>" + weightString);
    }
}
 
Example 18
Source File: MyResourcesAsia.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public MyResourcesAsia() {
    super("java.properties", "asia",
          Locale.JAPANESE, Locale.JAPAN, Locale.CHINESE, Locale.TAIWAN,
          new Locale("vi"));
}
 
Example 19
Source File: IDSGenLogToolpack.java    From han3_ji7_tsoo1_kian3 with GNU Affero General Public License v3.0 4 votes vote down vote up
/** 建立一个工具包。 */
public IDSGenLogToolpack()
{
	訊息型態 = new MessageConveyor(Locale.TAIWAN);
	記錄工具包 = new LocLoggerFactory(訊息型態);
}
 
Example 20
Source File: WrapLocale.java    From jphp with Apache License 2.0 4 votes vote down vote up
@Signature
public static Memory TAIWAN(Environment env, Memory... args) {
    return new ObjectMemory(new WrapLocale(env, Locale.TAIWAN));
}