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  {
24      public static String ROLE = I18N.class.getName();
25  
26      String ACCEPT_LANGUAGE = "Accept-Language";
27  
28      String getDefaultLanguage();
29  
30      String getDefaultCountry();
31  
32      String getDefaultBundleName();
33  
34      String[] getBundleNames();
35  
36      ResourceBundle getBundle();
37  
38      ResourceBundle getBundle( String bundleName );
39  
40      ResourceBundle getBundle( String bundleName, String languageHeader );
41  
42      ResourceBundle getBundle( String bundleName, Locale locale );
43  
44      Locale getLocale( String languageHeader );
45  
46      String getString( String key );
47  
48      String getString( String key, Locale locale );
49  
50      String getString( String bundleName, Locale locale, String key );
51  
52      String format( String key, Object arg1 );
53  
54      String format( String key, Object arg1, Object arg2 );
55  
56      String format( String bundleName, Locale locale, String key, Object arg1 );
57  
58      String format( String bundleName, Locale locale, String key, Object arg1, Object arg2 );
59  
60      String format( String bundleName, Locale locale, String key, Object[] args );
61  }