
|
If you were logged in you would be able to see more operations.
|
|
|
Loom
Created: 05/Feb/09 11:01 AM
Updated: 05/Feb/09 11:41 AM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
1.1
|
|
|
After some discussion, it seems that the easiest way to achieve translations of simple strings in JSP pages is the following:
${messages['stringToTranslate']}
This can be implemented by making MessagesRepository implement the Map interface, but it requires renaming the messagesRepository request attribute from 'messagesRepository' to 'messages'.
So, the warning is: if you are using ${messagesRepository} in your JSP pages, you should rename it to ${messages}. Java code should be fine, as long as it's using RequestAttributeNames.MESSAGES_REPOSITORY which will be updated accordingly.
|
|
Description
|
After some discussion, it seems that the easiest way to achieve translations of simple strings in JSP pages is the following:
${messages['stringToTranslate']}
This can be implemented by making MessagesRepository implement the Map interface, but it requires renaming the messagesRepository request attribute from 'messagesRepository' to 'messages'.
So, the warning is: if you are using ${messagesRepository} in your JSP pages, you should rename it to ${messages}. Java code should be fine, as long as it's using RequestAttributeNames.MESSAGES_REPOSITORY which will be updated accordingly. |
Show » |
|
To get the reference to the real MessagesRepository, just invoke ${messages.messagesRepository}