View Javadoc
1   package org.codehaus.plexus.i18n;
2   
3   /*
4    * Copyright 2001-2007 Codehaus Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  import java.util.Locale;
20  import java.util.ResourceBundle;
21  
22  public interface I18N {
23      public static String ROLE = I18N.class.getName();
24  
25      String ACCEPT_LANGUAGE = "Accept-Language";
26  
27      String getDefaultLanguage();
28  
29      String getDefaultCountry();
30  
31      String getDefaultBundleName();
32  
33      String[] getBundleNames();
34  
35      ResourceBundle getBundle();
36  
37      ResourceBundle getBundle(String bundleName);
38  
39      ResourceBundle getBundle(String bundleName, String languageHeader);
40  
41      ResourceBundle getBundle(String bundleName, Locale locale);
42  
43      Locale getLocale(String languageHeader);
44  
45      String getString(String key);
46  
47      String getString(String key, Locale locale);
48  
49      String getString(String bundleName, Locale locale, String key);
50  
51      String format(String key, Object arg1);
52  
53      String format(String key, Object arg1, Object arg2);
54  
55      String format(String bundleName, Locale locale, String key, Object arg1);
56  
57      String format(String bundleName, Locale locale, String key, Object arg1, Object arg2);
58  
59      String format(String bundleName, Locale locale, String key, Object[] args);
60  }