1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.kernel.language;
21  
22  import java.util.Locale;
23  
24  import javax.servlet.jsp.PageContext;
25  
26  /**
27   * <a href="UnicodeLanguage.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Brian Wing Shun Chan
30   *
31   */
32  public interface UnicodeLanguage {
33  
34      public String format(Locale locale, String pattern, Object argument);
35  
36      public String format(Locale locale, String pattern, Object[] arguments);
37  
38      public String format(
39          long companyId, Locale locale, String pattern, Object argument);
40  
41      public String format(
42          long companyId, Locale locale, String pattern, Object[] arguments);
43  
44      public String format(
45          PageContext pageContext, String pattern, Object argument);
46  
47      public String format(
48          PageContext pageContext, String pattern, Object argument,
49          boolean translateArguments);
50  
51      public String format(
52          PageContext pageContext, String pattern, Object[] arguments);
53  
54      public String format(
55          PageContext pageContext, String pattern, Object[] arguments,
56          boolean translateArguments);
57  
58      public String format(
59          PageContext pageContext, String pattern, LanguageWrapper argument);
60  
61      public String format(
62          PageContext pageContext, String pattern, LanguageWrapper argument,
63          boolean translateArguments);
64  
65      public String format(
66          PageContext pageContext, String pattern, LanguageWrapper[] arguments);
67  
68      public String format(
69          PageContext pageContext, String pattern, LanguageWrapper[] arguments,
70          boolean translateArguments);
71  
72      public String get(Locale locale, String key);
73  
74      public String get(long companyId, Locale locale, String key);
75  
76      public String get(
77          long companyId, Locale locale, String key, String defaultValue);
78  
79      public String get(PageContext pageContext, String key);
80  
81      public String get(PageContext pageContext, String key, String defaultValue);
82  
83      public String getTimeDescription(
84          PageContext pageContext, Long milliseconds);
85  
86      public String getTimeDescription(
87          PageContext pageContext, long milliseconds);
88  
89  }