Changeset 3434
- Timestamp:
- 04/28/09 15:46:42 (4 years ago)
- Location:
- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/localization
- Files:
-
- 3 edited
-
LocaleResolver.java (modified) (1 diff)
-
impl/AcceptLanguageHeaderResolver.java (modified) (2 diffs)
-
impl/JstlResolver.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/localization/LocaleResolver.java
r2868 r3434 35 35 36 36 /** 37 * Returns the locale of a give request. 37 38 * 38 39 * @param request 39 * The current request instance.40 * @return The locale of the user or<code>null</code> if the locale41 * c annot be resolved.40 * the current request instance 41 * @return the locale of the request, <code>null</code> if the locale 42 * couldn't be resolved 42 43 */ 43 44 public Locale resolveLocale(final HttpServletRequest request); -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/localization/impl/AcceptLanguageHeaderResolver.java
r2868 r3434 30 30 31 31 /** 32 * This implementation simply returns the user locale with 33 * {@link ServletRequest#getLocale()} but it has an advantage over the named 34 * method. If the <code>Accept-Language</code> header is empty, the default 35 * server locale will be returned. This behavior is undesired and can lead to 36 * wrong localized messages. Instead, this implementation will only return the 37 * locale if the header is not empty. 32 * Resolves the current user locale by calling 33 * {@link ServletRequest#getLocale()}. This method is somewhat superior to the 34 * <code>getLocale</code> method because it returns a locale if and only if the 35 * <code>Accept-Language</code> header is not empty. 38 36 * 39 37 * @version $Id$ … … 42 40 public class AcceptLanguageHeaderResolver implements LocaleResolver { 43 41 44 /*45 * (non-Javadoc)46 *47 * @see net.fckeditor.localization.LocaleResolver#resolveLocale(javax.servlet.http.HttpServletRequest)48 */49 42 public Locale resolveLocale(final HttpServletRequest request) { 50 43 -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/localization/impl/JstlResolver.java
r2868 r3434 29 29 30 30 /** 31 * This implementation maps directly to the JSTL locale mechanism. This is31 * Resolves the current user locale against JSTL/FMT session locale. This is 32 32 * recommended for those who use FMT tags for example. 33 33 * … … 41 41 } 42 42 43 /*44 * (non-Javadoc)45 * @see net.fckeditor.localization.LocaleResolver#resolveLocale(javax.servlet.http.HttpServletRequest)46 */47 43 public Locale resolveLocale(final HttpServletRequest request) { 48 44
Note: See TracChangeset
for help on using the changeset viewer.
