Created
January 22, 2020 14:44
-
-
Save slemarchand/d0a4f7decdafa7cbb413b33d392c7606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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