| 26 | | The interation pack offers you the possibility to localize any string responded to the user |
| 27 | | on a global basis and on a per locale basis and independently from the deployed |
| 28 | | framework/system (JSTL, Struts, Request, and other). |
| | 26 | The interation pack offers you the capability to localize any string responded |
| | 27 | to the user on a global basis and on a per locale basis and independently from |
| | 28 | the deployed framework/system (JSTL, Struts, Request, and other). |
| | 29 | |
| | 30 | Read on to see how you can customize the system to your needs: |
| | 31 | |
| | 32 | * The interface |
| | 33 | |
| | 34 | The interface {{{java-core/apidocs/net/fckeditor/localization/LocaleResolver.html}<<<net.fckeditor.localization.LocaleResolver>>>}} |
| | 35 | contains only one method: |
| 39 | | [[2]] <<The strings>> |
| | 48 | You have to choose an inplemenation, either an existing or a custom one. If no |
| | 49 | existing implemention suits your need, create your own. Implement the interface |
| | 50 | and resolve the locale the way you want. |
| | 51 | |
| | 52 | Existing, ready-to-go implementations: |
| | 53 | |
| | 54 | * {{{java-core/apidocs/net/fckeditor/localization/impl/AcceptLanguageHeaderResolver.html}<<<net.fckeditor.localization.impl.AcceptLanguageHeaderResolver>>>}} (default): |
| | 55 | It retrieves the first locale in the HTTP <<<Accept-Language>>> header, if |
| | 56 | availabe. |
| | 57 | |
| | 58 | * {{{java-core/apidocs/net/fckeditor/localization/impl/JstlResolver.html}<<<net.fckeditor.localization.impl.JstlResolver>>>}}: |
| | 59 | The user locale will be retrieved from the session set by JSTL's <<<fmt>>> |
| | 60 | tag or similar. |
| | 61 | |
| | 62 | [] |
| | 63 | |
| | 64 | ** Binding an implementation |
| | 65 | |
| | 66 | After your have chosen your desired implemenation, you have to bind it to the |
| | 67 | system. Put the fully-qualified class name of the implementation in the |
| | 68 | <<<fckeditor.properies>>>: |
| | 69 | |
| | 70 | +------------------------------------------------------------------------------+ |
| | 71 | localization.localeResolverImpl=<desired implementation> |
| | 72 | +------------------------------------------------------------------------------+ |
| | 73 | |
| | 74 | * The Strings |
| | 75 | |
| | 76 | [[2]] <<The strings>>: <<<message.*>>> |