Localization o4w (O4W)
At 27 FEB 2012 07:16:50AM Ed Keeman wrote:
Hey,
Can o4w be localized to other languages?
I want to translate "Save, Cansel, Search, Select" etc into dutch.
I can do the translation myself if i know where the textlabels are.
I hope someone can help me out.
Ed Keeman
At 27 FEB 2012 10:44AM bshumsky wrote:
Hey,
Can o4w be localized to other languages?
I want to translate "Save, Cansel, Search, Select" etc into dutch.
I can do the translation myself if i know where the textlabels are.
I hope someone can help me out.
Ed Keeman
Hi, Ed. Yes, O4W is designed to be localized (to at least some extent).
O4W uses standard message records to display things like Save, Cancel, etc. If you look at the O4W start menu, you'll see (under O4W Maintenance) an option for Messages. The Message Maintenance form lets you edit existing, or define new, messages.
The localization is accomplished by having you provide a stored procedure that O4W can call, which tells O4W what language suffix to put on the message ID it's trying to look up. So, let's say O4W is about to retrieve the "Save" message (which, I find by looking at the Message Maintenance screen, is message ID B105). If there is a procedure defined on the Configuration Maintenance screen that should be used for returning a "message suffix", that routine will be called before O4W tries to retrieve record B105. If that procedure returns a suffix - for example, "*NL" - then O4W will first try to retrieve the record B105*NL. Only if that record doesn't exist will O4W "fall back" to read the original B105 record.
So to do localization is a four step process:
a. Determine what suffix you want to use for your localized records;
b. Write a stored procedure that returns that suffix (if appropriate - maybe it checks where the browser call originates from, or maybe it just always returns the suffix);
c. Update the O4W Configuration record to use this suffix handler procedure;
d. Create new records in the O4W Messages table, using the existing keys and the new suffix
Your "suffix handler" stored procedure should be a function that takes no parameters, and just returns the suffix you wish to append - for example:
FUNCTION SUFFIXHANDLER_DUTCH()
RETURN "*NL"
See? It's gemakkelijk.
Hope that helps,
- Bryan Shumsky
At 28 FEB 2012 05:31AM Ed Keeman wrote:
Bryan,
I didn't get function thing working.
Actually the solution i found was easier.
Just open a message record, translate it and save it.
The record is saved as <app>*messageid and is used/working instantly.
But i still see labels in my webform which i can't find in the message table.
For example the qbflabels: "First Record" "Prev Record" "Next Record" "Last Record"
There ar also a couple of "OR" labels.
Regards
Ed Keeman
At 28 FEB 2012 10:58AM bshumsky wrote:
Bryan,
I didn't get function thing working.
Actually the solution i found was easier.
Just open a message record, translate it and save it.
The record is saved as <app>*messageid and is used/working instantly.
But i still see labels in my webform which i can't find in the message table.
For example the qbflabels: "First Record" "Prev Record" "Next Record" "Last Record"
There ar also a couple of "OR" labels.
Regards
Ed Keeman
Hi, Ed. Sorry to hear that the suffix function wasn't working for you, but yes, since our messages are repository based, you can "override" them in an inherited application. So long as everyone logging into that application wants to use the same language set, you can indeed just overwrite those message records.
You are correct, there are a number of strings "hard coded" into the form, but you should find that several of them have been removed (and put into the messages table) with the upcoming 9.3.1 release.
Thanks,
- Bryan Shumsky