Archive for 11g

Localization of strings through Java in UCM

(Credit for this one goes to a colleague of mine, who found this for me when I complained that ye olde way of localizing strings didn’t work anymore.)

Back in UCM 10g, many used the LocaleUtils.encodeMessage(…) method to display strings in a localized way when using Java, e.g.:

LocaleUtils.encodeMessage("wwMyStringKey", null)
LocaleUtils.encodeMessage("wwMyOtherStringKey", null, "some_param")

In UCM 11g, this no longer works. There’s no error message or anything like that, but the string just isn’t localized. Instead, the key of the string is displayed. An alternate way of doing this (which actually also works in 10g) is the LocaleResources.getString(…) method.

Here’s an example of arguments that could be passed to the method:

LocaleResources.getString(String "ID_of_my_string", ExecutionContext m_service)

There’s different variations that can be used to pass the parameters of the string, as you can see in the screenshot below.

LocaleResources.getString(...) screenshot

LocaleResources.getString(...) screenshot


Leave a Comment

ifClause for CoreMenuItems in UCM 11g

I plan on blogging a bit about UCM 11g, as I gain more experience with 11g.

One useful but seemingly not yet documented feature I discovered today, was that it’s  possible to specify an ifClause for menuitems. Flags can be used to specify some conditions, but this is a bit limited.

With an ifClause, however, you can type any Idoc expression you want. Read the rest of this entry »

Leave a Comment