掲示板
Hook I18n JSP
Hello Guys
I tried to change 2 things in my hook. First i tried to add a own key in my JSP-hook and tried to translate it in the Language_de.properties, but that didn't work. I also tried to overwrite the lang.user.name.field.names from the portal-impl. For that i added the following class:
But i could still not overwrite the Keys.
My Language_de.properties under the path /registration-hook-jsp/src/main/resources/content/ looks like this:
and in the JSP hook i use name='attention". I also tried key="attention".
The blade.jsp.portlet from the samples worked. I'm on windows.
I tried to change 2 things in my hook. First i tried to add a own key in my JSP-hook and tried to translate it in the Language_de.properties, but that didn't work. I also tried to overwrite the lang.user.name.field.names from the portal-impl. For that i added the following class:
package com.clavisit.faberplace.portal;
import java.util.Enumeration;
import java.util.ResourceBundle;
import org.osgi.service.component.annotations.Component;
import com.liferay.portal.kernel.language.UTF8Control;
@Component(
property = { "language.id=de_DE" },
service = ResourceBundle.class
)
public class DeDEResourceBundle extends ResourceBundle {
@Override
protected Object handleGetObject(String key) {
return _resourceBundle.getObject(key);
}
@Override
public Enumeration<string> getKeys() {
return _resourceBundle.getKeys();
}
private final ResourceBundle _resourceBundle = ResourceBundle.getBundle("content.Language", UTF8Control.INSTANCE);
}</string>
But i could still not overwrite the Keys.
My Language_de.properties under the path /registration-hook-jsp/src/main/resources/content/ looks like this:
attention=Text
lang.user.name.field.names=prefix,first-name,last-name
and in the JSP hook i use name='attention". I also tried key="attention".
The blade.jsp.portlet from the samples worked. I'm on windows.