Localization

E

ecrichlow

I have to localize our AddIn. On thw Windows side there are
facilities in VB that make this fairly easy. In VBA on the Mac side
I'm finidng that these same facilities don't seem to exist.

Has anybody done localization in VBA on Office (PowerPoint) on the
Mac?

If so, how did you go about implementing it?

....Thanx...
....Eric...
 
S

Steve Rindsberg

I have to localize our AddIn. On thw Windows side there are
facilities in VB that make this fairly easy. In VBA on the Mac side
I'm finidng that these same facilities don't seem to exist.

VB <> VBA, even under Windows.
In fact there are considerable differences between the implementations of VBA
in different Office versions and between the different Office apps.
Then to add to the fun, Mac VBA, even in the current versions, is more or less
the same as Windows VBA version 5, the version in Office 97.

What specific facilities are you missing?



================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
E

ecrichlow

Steve,

Mainly what I'm missing is the ability to read in a resource file
with a set of strings in it and then use LoadResString to populate my
text fields with strings from the proper language.

Also, there doesn't seem to be any way of determining what the
system language is.

But I think I've worked around the problem, and, surprisingly, it
seems to have been fairly easy. For what we're doing, I have to have a
native background app running that "communicates" with my AddIn
(through the very low-tech method of creating files whose names serve
as commands that my AddIn periodically looks for.) I've used that
mechanism to have the native app figure out what language the system is
in, and tell the AddIn which language file to read in. Then I wrote my
own simple version of LoadResString to maintain some compatibility with
the Windows AddIn code.

Only problem now is that Line Input # doesn't seem to be stopping
at a carriage return when it encounters one. And other string
segmenting functions don't seem to be behaving as expected. Hopefully
that won't be too hard to work around. Perhaps I'm just
misunderstanding how they're supposed to work.

....Eric...
 
S

Steve Rindsberg

Mainly what I'm missing is the ability to read in a resource file
with a set of strings in it and then use LoadResString to populate my
text fields with strings from the proper language.

OK. That's a VBA vs VB thing more than PC/Mac.

You might instead need to distribute language files in whatever format works
for you. Read them in at startup or use a function to return the string from
the file as needed.

Ah. And if I'd read all of the reply before starting to babble, I'd have seen
that you did that and then some. said:
Also, there doesn't seem to be any way of determining what the
system language is.

Sigh. Yeah.
Application.LanguageSettings .... doesn't seem to be supported.

You might google for Applescript methods of doing this; you can call
Applescript from within PPT.
But I think I've worked around the problem, and, surprisingly, it
seems to have been fairly easy. For what we're doing, I have to have a
native background app running that "communicates" with my AddIn
(through the very low-tech method of creating files whose names serve
as commands that my AddIn periodically looks for.) I've used that
mechanism to have the native app figure out what language the system is
in, and tell the AddIn which language file to read in. Then I wrote my
own simple version of LoadResString to maintain some compatibility with
the Windows AddIn code.

Only problem now is that Line Input # doesn't seem to be stopping
at a carriage return when it encounters one. And other string
segmenting functions don't seem to be behaving as expected. Hopefully
that won't be too hard to work around. Perhaps I'm just
misunderstanding how they're supposed to work.

Haven't run into this one but it may stop at the *system defined* line ending.
For Windows, CR/LF pairs. For Mac, CR only, isnt' it? So you might get lines
that include the LF.

....Eric...

================================================
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top