1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.jetspeed.services.customlocalization;
17
18 import java.util.Locale;
19 import java.util.ResourceBundle;
20
21 import org.apache.turbine.services.localization.LocalizationService;
22 import org.apache.turbine.util.RunData;
23
24 /***
25 * Custom Localization allows for the localization properties to changed dynamically,
26 * without shutting down the application server.
27 *
28 * @author <a href="mailto:massimiliano.dessi@gruppoatlantis.it">Dessė Massimiliano</a>
29 * @version $Id: CustomLocalizationService.java,v 1.5 2004/02/23 03:49:33 jford Exp $
30 */
31 public interface CustomLocalizationService extends LocalizationService
32 {
33 /***
34 * Get the locale from the session first, then fallback to normal request headers.
35 *
36 * @param data
37 * @return Current locale based on state.
38 */
39 Locale getLocale(RunData data);
40
41 /***
42 * Get the resource bundle given the state of the current request.
43 *
44 * @param data
45 * @return The matched resource bundled.
46 */
47 ResourceBundle getBundle(RunData data);
48
49
50 public static final String SERVICE_NAME = "LocalizationService";
51 public static final String ACCEPT_LANGUAGE = "Accept-Language";
52 }