net.sf.latexdraw.lang
Class LangTool

java.lang.Object
  extended by net.sf.latexdraw.lang.LangTool

public final class LangTool
extends java.lang.Object

This class defines the localisation.

This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

09/01/06

Version:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
static class LangTool.Lang
           
 
Field Summary
static LangTool INSTANCE
          The singleton to use when wanting to use language utilities.
private static LangTool.Lang LANG_CURRENT
           
private  java.util.Map<java.lang.String,LangTool.Lang> mapLangs
          This map provides an easy access to the language items.
static java.lang.String MISSING_KEY
          The string corresponding to a missing key.
private static java.util.ResourceBundle RES_BUNDLE_16
           
private static java.util.ResourceBundle RES_BUNDLE_17
           
private static java.util.ResourceBundle RES_BUNDLE_18
           
private static java.util.ResourceBundle RES_BUNDLE_19
           
private static java.util.ResourceBundle RES_BUNDLE_DIALOG_FRAME
           
private static java.util.ResourceBundle RES_BUNDLE_LFRAME
           
private static java.util.ResourceBundle RES_BUNDLE_OTHERS
           
 
Constructor Summary
private LangTool()
           
 
Method Summary
static LangTool.Lang getCurrentLanguage()
          Allows to get the language of the package.
 java.util.Map<java.lang.String,LangTool.Lang> getMapLangs()
           
 java.lang.String getString16(java.lang.String key)
          Allows to get a string of the new 1.6 strings.
 java.lang.String getString17(java.lang.String key)
          Allows to get a string of the new 1.7 strings.
 java.lang.String getString18(java.lang.String key)
          Allows to get a string of the new 1.8 strings.
 java.lang.String getString19(java.lang.String key)
          Allows to get a string of the new 1.8 strings.
 java.lang.String getStringDialogFrame(java.lang.String key)
          Allows to get a string of the dialog frames.
private  java.lang.String getStringFromResourceBundle(java.lang.String key, java.util.ResourceBundle bundle)
           
 java.lang.String getStringLaTeXDrawFrame(java.lang.String key)
          Allows to get a string of the LaTeXDrawFrame
 java.lang.String getStringOthers(java.lang.String key)
          Allows to get a string of the others components
private  void initMap()
           
 LangTool.Lang readLang()
          Allows to get the language of the program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MISSING_KEY

public static final java.lang.String MISSING_KEY
The string corresponding to a missing key.

See Also:
Constant Field Values

RES_BUNDLE_LFRAME

private static final java.util.ResourceBundle RES_BUNDLE_LFRAME

RES_BUNDLE_DIALOG_FRAME

private static final java.util.ResourceBundle RES_BUNDLE_DIALOG_FRAME

RES_BUNDLE_OTHERS

private static final java.util.ResourceBundle RES_BUNDLE_OTHERS

RES_BUNDLE_16

private static final java.util.ResourceBundle RES_BUNDLE_16

RES_BUNDLE_17

private static final java.util.ResourceBundle RES_BUNDLE_17

RES_BUNDLE_18

private static final java.util.ResourceBundle RES_BUNDLE_18

RES_BUNDLE_19

private static final java.util.ResourceBundle RES_BUNDLE_19

INSTANCE

public static final LangTool INSTANCE
The singleton to use when wanting to use language utilities.


LANG_CURRENT

private static final LangTool.Lang LANG_CURRENT

mapLangs

private java.util.Map<java.lang.String,LangTool.Lang> mapLangs
This map provides an easy access to the language items.

Constructor Detail

LangTool

private LangTool()
Method Detail

initMap

private void initMap()

getMapLangs

public java.util.Map<java.lang.String,LangTool.Lang> getMapLangs()
Returns:
the map containing mapping between name and languages.
Since:
3.0

getStringOthers

public java.lang.String getStringOthers(java.lang.String key)
Allows to get a string of the others components

Parameters:
key - The key of the string
Returns:
The string

getStringLaTeXDrawFrame

public java.lang.String getStringLaTeXDrawFrame(java.lang.String key)
Allows to get a string of the LaTeXDrawFrame

Parameters:
key - The key of the string
Returns:
The string

getString16

public java.lang.String getString16(java.lang.String key)
Allows to get a string of the new 1.6 strings.

Parameters:
key - The key of the string.
Returns:
The string.

getString17

public java.lang.String getString17(java.lang.String key)
Allows to get a string of the new 1.7 strings.

Parameters:
key - The key of the string.
Returns:
The string.
Since:
1.7

getString18

public java.lang.String getString18(java.lang.String key)
Allows to get a string of the new 1.8 strings.

Parameters:
key - The key of the string.
Returns:
The string.
Since:
1.8

getString19

public java.lang.String getString19(java.lang.String key)
Allows to get a string of the new 1.8 strings.

Parameters:
key - The key of the string.
Returns:
The string.
Since:
1.8

getStringDialogFrame

public java.lang.String getStringDialogFrame(java.lang.String key)
Allows to get a string of the dialog frames.

Parameters:
key - The key of the string.
Returns:
The string.

getStringFromResourceBundle

private java.lang.String getStringFromResourceBundle(java.lang.String key,
                                                     java.util.ResourceBundle bundle)
Parameters:
key - The key of the string.
bundle - The bundle to search into.
Returns:
The found String or MISSING_KEY or !key!
Since:
3.0

readLang

public LangTool.Lang readLang()
Allows to get the language of the program.

Returns:
The read language, or the default language.

getCurrentLanguage

public static LangTool.Lang getCurrentLanguage()
Allows to get the language of the package.

Returns:
The language of the package.