Revision 1947 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/i18n/impl/DummyI18nManager.java
DummyI18nManager.java | ||
---|---|---|
41 | 41 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
42 | 42 |
* MA 02110-1301, USA. |
43 | 43 |
* |
44 |
*/ |
|
44 |
*/
|
|
45 | 45 |
|
46 |
/* |
|
46 |
/*
|
|
47 | 47 |
* AUTHORS (In addition to CIT): |
48 | 48 |
* 2010 {} {{Task}} |
49 |
*/ |
|
49 |
*/
|
|
50 | 50 |
package org.gvsig.tools.i18n.impl; |
51 | 51 |
|
52 | 52 |
import java.io.File; |
53 |
import java.util.Collections; |
|
54 |
import java.util.List; |
|
55 |
import java.util.Locale; |
|
53 | 56 |
import org.gvsig.tools.i18n.I18nManager; |
54 | 57 |
|
55 | 58 |
/** |
56 | 59 |
* Dummy {@link I18nManager} implementation to be used when there has not been |
57 | 60 |
* registered an implementation. |
58 |
*
|
|
61 |
* |
|
59 | 62 |
* Returns as value the same message to get the translation for. |
60 |
*
|
|
63 |
* |
|
61 | 64 |
* @author 2010- C?sar Ordi?ana - gvSIG team |
62 | 65 |
*/ |
63 | 66 |
public class DummyI18nManager implements I18nManager { |
64 | 67 |
|
65 |
public String getTranslation(String message) { |
|
66 |
// Return the same message, this is a dummy implementation. |
|
67 |
return message; |
|
68 |
} |
|
68 |
@Override |
|
69 |
public String getTranslation(String message) { |
|
70 |
// Return the same message, this is a dummy implementation. |
|
71 |
return message; |
|
72 |
} |
|
69 | 73 |
|
70 |
public String getTranslation(String message, String[] args) { |
|
71 |
// Return the same message, this is a dummy implementation. |
|
72 |
return message; |
|
73 |
} |
|
74 |
@Override |
|
75 |
public String getTranslation(String message, String[] args) { |
|
76 |
// Return the same message, this is a dummy implementation. |
|
77 |
return message; |
|
78 |
} |
|
74 | 79 |
|
75 |
public void addResourceFamily(String family, ClassLoader loader, |
|
76 |
String callerName) { |
|
77 |
// Do nothing, this is a dummy implementation. |
|
78 |
} |
|
80 |
@Override |
|
81 |
public void addResourceFamily(String family, ClassLoader loader, |
|
82 |
String callerName) { |
|
83 |
// Do nothing, this is a dummy implementation. |
|
84 |
} |
|
79 | 85 |
|
80 |
@Override |
|
81 |
public void addResourceFamily(String family, File folder) { |
|
82 |
// Do nothing, this is a dummy implementation. |
|
83 |
} |
|
84 |
|
|
85 |
|
|
86 |
} |
|
86 |
@Override |
|
87 |
public void addResourceFamily(String family, File folder) { |
|
88 |
// Do nothing, this is a dummy implementation. |
|
89 |
} |
|
90 |
|
|
91 |
@Override |
|
92 |
public List<Locale> getPreferredLocales() { |
|
93 |
return Collections.EMPTY_LIST; |
|
94 |
} |
|
95 |
|
|
96 |
@Override |
|
97 |
public Locale getCurrentLocale() { |
|
98 |
return Locale.getDefault(); |
|
99 |
} |
|
100 |
|
|
101 |
} |
Also available in: Unified diff