Package org.geotools.util

Examples of org.geotools.util.ResourceInternationalString


     *
     * @param  key The key for the desired string.
     * @return An international string for the given key.
     */
    public static InternationalString formatInternational(final int key) {
        return new ResourceInternationalString(Vocabulary.class.getName(), String.valueOf(key));
    }
View Full Code Here


     * @param key The key for the resource to fetch
     * @param resources The name of the resource bundle, as a fully qualified class name.
     * @return ResourceInternationalString
     */
    public static InternationalString text(String key, String resourceBundle ){
        return new ResourceInternationalString( resourceBundle, key );
    }
View Full Code Here

     *
     * @param  key The key for the desired string.
     * @return An international string for the given key.
     */
    public static InternationalString formatInternational(final int key) {
        return new ResourceInternationalString(Vocabulary.class.getName(), String.valueOf(key));
    }
View Full Code Here

    // exampleText end
}

private void exampleResourceInternationalString() {
    // exampleResourceInternationalString start
    ResourceInternationalString greeting = new ResourceInternationalString("message.properties",
            "greeting");
   
    System.out.println(greeting); // will output best match to current Locale
    System.out.println(greeting.toString(Locale.CANADA_FRENCH)); // should output best match
   
    // Note the "messages.properties" above is used with Java ResourceBundle
    // In a manner similar to this
    ResourceBundle.getBundle("message.properties", Locale.getDefault()).getString("greeting");
    // exampleResourceInternationalString end
View Full Code Here

TOP

Related Classes of org.geotools.util.ResourceInternationalString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.