Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LanguageMgr suggestions
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
LanguageMgr suggestions
Miscellaneous
Thread ID:
00688092
Message ID:
00688092
Views:
60
This suggestion probably can't be incorporated into the framework, because it might break previously written apps, but I'll mention it anyway. In the GetLocalizedText() method, it seems like it would make a lot more sense to return the passed in string if a translation is not found. Most of the time, it seems like displaying a message in the default language is much better than displaying nothing at all. And, if you want to capture this with the current code, you end up writing a lot of code like:
lcString = goApp.GetLocalizedText("Hello")

IF EMPTY(lcString)
   lcString = "Hello"
ENDIF

* Do something...
I changed this in my subclass to just return the same string.

Another thing that I changed that might be helpful is I added two properties to LanguageMgr:

lRightToLeft
cSpecialFont

I also added two fields to the language table with the same name.

The properties get set in the SetCurrentLanguage() method. Now when each control localizes itself, you can add code like:
This.RightToLeft = goApp.oLanguageMgr.lRightToLeft

IF !EMPTY(goApp.oLanguageMgr.cSpecialFont)
   This.FontName = goApp.oLanguageMgr.cSpecialFont
ENDIF
This makes it a little easier to support languages that require a special font and/or are written right to left (for example, Arabic).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform