salomeTMF_plug.pluginxlsxml.language
Class Language

java.lang.Object
  extended by salomeTMF_plug.pluginxlsxml.language.Language

public class Language
extends java.lang.Object

* Created on 10 juin 2005 * SalomeTMF is a Test Managment Framework * Copyright (C) 2005 France Telecom R&D * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Contact: mikael.marche@rd.francetelecom.com


Field Summary
(package private)  java.util.Locale currentLocale
          Local variable
(package private)  java.util.ResourceBundle i18n
          For the resource file
(package private)  java.util.ResourceBundle i18nErr
           
(package private)  java.util.ResourceBundle i18nLog
           
private static Language language
          Static variable
 
Constructor Summary
private Language()
          Constructor of the language
 
Method Summary
static Language getInstance()
          Get the instance of the language
 java.lang.String getText(java.lang.String key)
          Get text in parameter
 java.lang.String getTextErr(java.lang.String key)
          Return the error text corresponding to the key
 java.lang.String getTextLog(java.lang.String key)
          Write an error if string not found
 void setLocale(java.util.Locale locale)
          Set the local values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

language

private static Language language
Static variable


currentLocale

java.util.Locale currentLocale
Local variable


i18n

java.util.ResourceBundle i18n
For the resource file


i18nErr

java.util.ResourceBundle i18nErr

i18nLog

java.util.ResourceBundle i18nLog
Constructor Detail

Language

private Language()
Constructor of the language

Method Detail

getInstance

public static Language getInstance()
Get the instance of the language

Returns:
language

setLocale

public void setLocale(java.util.Locale locale)
Set the local values

Parameters:
locale - get Language of SalomeTMF

getText

public java.lang.String getText(java.lang.String key)
Get text in parameter

Parameters:
key - string to search
Returns:
string found

getTextLog

public java.lang.String getTextLog(java.lang.String key)
Write an error if string not found

Parameters:
key - String to search
Returns:
string not found

getTextErr

public java.lang.String getTextErr(java.lang.String key)
Return the error text corresponding to the key

Parameters:
key - an error key belong i18nErr
Returns:
an error