Code example for Locale

Methods: setDefault

0
        // IEP currency symbol is IEP since CLDR2.0 release. 
        assertEquals("currI.getSymbol()", "IEP", currI.getSymbol());
        // END android-changed 
        assertEquals("currUS.getSymbol()", "$", currUS.getSymbol());
 
        Locale.setDefault(new Locale("en", "IE"));
        // BEGIN android-changed 
        assertEquals("currK.getSymbol()", "\u20a9", currK.getSymbol());
        assertEquals("currI.getSymbol()", "IEP", currI.getSymbol());
        assertEquals("currUS.getSymbol()", "$", currUS.getSymbol());
        // END android-changed 
 
        // test what happens if this is an invalid locale, 
        // one with Korean country but an India language 
        Locale.setDefault(new Locale("kr", "KR"));
        // BEGIN android-changed 
        assertEquals("currK.getSymbol()", "\u20a9", currK.getSymbol());
        assertEquals("currI.getSymbol()", "IEP", currI.getSymbol());
        // END android-changed 
        assertEquals("currUS.getSymbol()", "$", currUS.getSymbol());
    }