All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.freedesktop.dbus.Gettext Maven / Gradle / Ivy

Go to download

Improved version of the DBus-Java library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/).

There is a newer version: 3.3.2
Show newest version
/*
 * Pescetti Pseudo-Duplimate Generator
 *
 * Copyright (C) 2007 Matthew Johnson
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License Version 2 as published by
 * the Free Software Foundation.  This program is distributed in the hope that
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.  You should have received a
 * copy of the GNU Lesser General Public License along with this program; if not,
 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA  02111-1307, USA.
 *
 * To Contact me, please email [email protected]
 *
 */
package org.freedesktop.dbus;

import java.util.ResourceBundle;

public final class Gettext {
    private static ResourceBundle myResources;

    private Gettext() {

    }

    static {
        try {
            myResources = ResourceBundle.getBundle("dbusjava_localized");
        } catch (Exception _ex) {
            // suppress exception if language could not be found
        }
    }

    public static String t(String s) {
        if (myResources == null) {
            return s;
        }
        return myResources.getString(s);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy