Package de.bea.domingo.i18n

Resources supporting internationalization.

See:
          Description

Class Summary
ResourceManager Manager for internatialized resources.
Resources A class to simplify extracting localized strings, icons and other common resources from a ResourceBundle.
 

Package de.bea.domingo.i18n Description

Resources supporting internationalization.

Usage

Use the ResourceManager to get the Resources of a package. Use the Resource object to get translations for your messages.

package de.bea.mypackage;

import de.bea.domingo.i18n.ResourceManager;
import de.bea.domingo.i18n.Resources;

public final class MyClass {

    private static final Resources RESOURCES = ResourceManager.getPackageResources(MyClass.class);

    public void mySimpleMethod() {
        String mssage = RESOURCES.getString("my.message");
    }

    public void myOtherMethod() {
        String mssage = RESOURCES.getString("MyClass.my.message");
    }
}

The file de/bea/mypackage/Resources.properties

my.message=This is my message in english
MyClass.my.message=An example with class-related messages (helpfull if you have many messages in a package)

The file de/bea/mypackage/Resources_de.properties

my.message=Dies ist meine Nachricht auf deutsch
MyClass.my.message=Ein Beispiel mit Klassenbezogenen Nachrichten (hilfreich, wenn in einem Package viele Nachrichten benutzt werden)



Domingo Java-API