Commit | Line | Data |
---|---|---|
a3b510ab NR |
1 | package com.googlecode.lanterna.bundle; |
2 | ||
3 | import java.util.Locale; | |
4 | ||
5 | /** | |
6 | * This class permits to get easily localized strings about the UI. | |
7 | * @author silveryocha | |
8 | */ | |
9 | public class LocalizedUIBundle extends BundleLocator { | |
10 | ||
11 | private static final LocalizedUIBundle MY_BUNDLE = new LocalizedUIBundle("multilang.lanterna-ui"); | |
12 | ||
13 | public static String get(String key, String... parameters) { | |
14 | return get(Locale.getDefault(), key, parameters); | |
15 | } | |
16 | ||
17 | public static String get(Locale locale, String key, String... parameters) { | |
18 | return MY_BUNDLE.getBundleKeyValue(locale, key, (Object[])parameters); | |
19 | } | |
20 | ||
21 | private LocalizedUIBundle(final String bundleName) { | |
22 | super(bundleName); | |
23 | } | |
24 | } |