One quick answer is to restore g11n.MultiSearch.Entity.pesquisa_de_entidades with the value from the .properties file.
It is normal not to have any error since "g11n.MultiSearch.Entity.pesquisa_de_entidades" is replaced with the value from the .properties file.
I haven’t tried this, but in the included view, do you also have externalized resources? If so, can you copy (duplicate) g11n.MultiSearch.Entity.pesquisa_de_entidades into the included view’s resource file?
The duplicate was not a good idea to me since I had to make double the translations.
So my correction of the problem was to change the keys into the Application file, I also changed the imported view to get the I18N from the Application and not from the imported view, this solved the problem
I have in property file
g11n.MedicineContextInfo.default.desactivar=Deactivate
g11n.MedicineContextInfo.default.activar=Activate
Now in my view I want something like this:
#{MedicineContextInfo.portletResources[“g11n.MedicineContextInfo.default.#{MedicineContextInfoDefaultviewView.activateDeactivate}”]}
Basically I want to concat the result from the method activateDeactivate into the string “g11n.MedicineContextInfo.default”. However the second EL is never resolved and is simple appended to the String, which is not in the property file. As result this can not be correctly I18N.
I already thought about that solution but that does not cover all my problems. Additionally I have another problem. I have a table where one of the column is the name of the week (en: Monday, Tuesday…; pt: Segunda, Terça). So the best way in this case is to contact the String to be I18N
Property File
g11n.MedicineContextInfo.date.default.seg
g11n.MedicineContextInfo.date.default.ter
g11n.MedicineContextInfo.date.default.qua
g11n.MedicineContextInfo.date.default.qui.
etc
EL expression
I would like to have something like that
#{MedicineContextInfo.portletResources[“g11n.MedicineContextInfo.date.#{row.dayOfWeek}”]}.
For instance, JBoss contains a Concat function that works in EL, does CAF contains something similar?
I’m wondering how this problem is solved in CAF since this should be a normal problem.
I think than in your case the day of the week will be determined in the bean.
So, you should use I18N there.
public class MedicineContextInfo{
public String getCurrentDayOfWeek(){
//determine current day
// get the proper I18n message
String dayOfWeek = ContextUtils.localizeMessage(ContextUtils.getFacesContext(), bundleName, key, null, false);
....
return ...;
}
...
}