]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - base/runtime/org.argeo.util/src/main/java/org/argeo/util/LocaleUtils.java
1 package org
.argeo
.util
;
3 import java
.util
.Locale
;
5 import org
.argeo
.ArgeoException
;
7 /** Utilities around internationalization. */
8 public class LocaleUtils
{
10 * The locale of the current thread and its children. Allows to deal with
11 * internationalisation as a cross cutting aspect. Never null.
13 public final static InheritableThreadLocal
<Locale
> threadLocale
= new InheritableThreadLocal
<Locale
>() {
15 protected Locale
initialValue() {
16 return Locale
.getDefault();
20 public void set(Locale value
) {
22 throw new ArgeoException("Thread local cannot be null.");