General information
Category:
Coding, syntax & commands
I don't know for certain...but I'd hazard a guess: yes, you'll have to find out what the appInfo / progInfo / prgmInfo equivalent is for each language (unfortunately MS decided to translate it) and put the appropriate case statement into the makeWord function.
What I did was create my own wordClass wrapper and subclassed it for the various languages (makeWord then returns either NULL or the appropriate language object).
The base class uses the standard (well, for me) English command names (e.g. fileClose) and passes them to the OLE word object. Derived classes (e.g. danskWord) have the same-name exposed methods but call the underlying word object in the appropriate language. That way you can write all your routines ignoring the underlying language, and add other languages as you go.
E.g.
In the base object I have a method .editselectall which calls the Word OLE object (wo)...
this.wo.editSelectAll
In the Dansk version I have the same method (inherited from the base class) but it is phrased:-
this.wo.RedigerMarkerAlt
Note that this works very well - I don't know about SvenskWord but DanskWord was only partially translated (i.e. a lot of the commands remain in English) so only about 60% of the commands had to be changed.
Watch out for things like CommandValid-GyldigKommando and editGotoPage-redigerGaTil (where you pass the string to test) as the passed string has to be translated *as well as* the command.
...and If you think this is messy, I originally had it in Access 2 with NO classes...
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only