Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slemarchand/d0a4f7decdafa7cbb413b33d392c7606 to your computer and use it in GitHub Desktop.
Save slemarchand/d0a4f7decdafa7cbb413b33d392c7606 to your computer and use it in GitHub Desktop.
import com.liferay.portal.kernel.language.UTF8Control;
import java.util.Enumeration;
import java.util.ResourceBundle;
import org.osgi.service.component.annotations.Component;
@Component(
immediate = true, property = { "language.id=" /* DO NOT REMOVE this property value */},
service = ResourceBundle.class
)
public class LiferayDefaultResourceBundleOverride extends ResourceBundle {
@Override
public Enumeration<String> getKeys() {
return _resourceBundle.getKeys();
}
@Override
protected Object handleGetObject(String key) {
return _resourceBundle.getObject(key);
}
private final ResourceBundle _resourceBundle = ResourceBundle.getBundle(
"content.Language", UTF8Control.INSTANCE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment