Archive for January, 2011

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

Advertisements

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

Getting Word/Excel/Powerpoint to use centimeters instead of inches under Crossover Wine / CxOffice

(Just saw I still had this two-year-old write-up in my list of drafts, so I decided to quickly publish it in case this still helps anyone. Might be very outdated, though.)

Just a quick note, both as a reference for myself as for anybody else who runs into the same problem, as I can’t seem to find much about it on the ‘net.

If you’re using Crossover Wine, or Crossover Office (CxOffice) to run Word, Excel or Powerpoint, it’s possible that those apps are using inches instead of centimers (or the other way around, obviously). Read the rest of this entry »

Leave a Comment