01: /*
02: * Copyright 2003 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package velosurf.web.l10n;
18:
19: import java.util.Locale;
20:
21: /** To be implemented by localizers used by the engine to get localized strings from their database id.
22: *
23: * @author <a href=mailto:claude.brisson@gmail.com>Claude Brisson</a>
24: *
25: **/
26:
27: public interface Localizer {
28: /**
29: * Locale setter.
30: * @param locale locale
31: */
32: public void setLocale(Locale locale);
33:
34: /**
35: * Locale getter.
36: * @return locale
37: */
38: public Locale getLocale();
39:
40: /**
41: * Message getter.
42: * @param id message id
43: * @return localized message
44: */
45: public String get(Object id);
46:
47: /**
48: * Parameterized message getter.
49: * @param id message id
50: * @param param message parameters
51: * @return localized message
52: */
53: public String get(Object id, Object... param);
54: }
|