[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Find Lotus Notes Language

Posted on 2004-11-22
Medium Priority
Last Modified: 2013-12-18
I want to find using Lotus C API whether the installed Lotus Notes is French or German or English or Potugese.
(To add to above - Lotus Notes is available for download in English , French German, Brazilian etc languages. I want to detect which one is installed.)

Please help me with this

Question by:Santino_k
  • 3
  • 3
LVL 15

Expert Comment

ID: 12654007
Why ?  If you want to get the user language, those are fairly basic functions, but to get the client version, I only know the basic Lotusscript functions (or formula's) that may or may not return the version of the client (I'm not sure).  But if you want to know what user the client is working in, that's a different story, and a lot easier handled.

Is this R5 or R6 ?


LVL 31

Expert Comment

ID: 12656254
The problem you run into is that the client and API are separate.  I don't know of a constant or function that really tells you what the lcient is installed as, and certainly not the API.  Here's what might come closest:

1) Use OSGetLMBCS to get the default char set.  I'm pretty sure each language has a different default character set

2) Find a know, basic error message -- one that is not likely to change from version to version, except for language.  Hard code the error number.  Then use OSLoadSring to get the text of the error, can compare it to a hard-coded list of language-specific error strings.

Author Comment

ID: 12662036
Hi guys,
Thanks for your reply. Look I know the way to detect if the version is R5 or R6. The problem is with detecting what Language setup was used (with language, the Design Elements Labels/names changes in NSF)
I'll further explain what I want to do -
Considering for  R5,  I want to Insert my own Design Element programmatically after "Description: " element in Computed subform. Programmatically I can traverse all traverse elements. The problem comes when I go thro elements of Lotus Notes Brazillian/Portugese version installed (I am not talking about locale manually set by user). The "Description: " element is now in Portugese. Hence my program fails.
Thats why I want to find what language setup of Notes is installed so that my program becomes generic enough to detect what label to check for the design elements.

qwaletee, I'll try workaround you suggested but it would be great to get actual API or probably querying value of some obvious Element of NSF file that tells what is the Language of Setup used

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 31

Expert Comment

ID: 12670767
You know what?  I really don't understand what you are talking about.  I think there must be some fuzzy communication.  But I'm almost certain you are confusd about the way Notes works.

Database languages are completely independent of client install languages.  And better yet, client insatll languages are completely independent of user language preferences (except for how dfeaults are set up) -- and the user language preference is more closely associated with database langauge properties than with client language.

The client install language determines the following:
* langauge of Domino system menus (File, Edit, View, ...)
* language used in system dialog boxes (Database open, user preferences)
* the text of error messages
* the default setting for the user language preference, which is found in FIle->User->Preferences...International tab
* the local file database templates will also be in the same language (contacts, journal, system log)

The user mail file langauge is not determined by the client at all.  It is determined by the template used on the server.

Domino design principles also allow a database to be designed with multiple languages within the database database.  When enabled for this, a database can have a list of alternate design element versions with langauge tags associated.  When a user opens such a database, the user language preference determines which alternate version of a design element is used.  If there is no match, the database default language is given precedence.

The mail file does NOT take advanatage of this functionality.  Instead, Lotus produces multiple versions of the mail template, each in a single language.  This is mostly because the mail file would otheriwse be impossibly large.

You CAN obtain the user language preference.  You CAN'T query the client install language directly, except via the error message trick I described in the earlier comment.  You CAN'T query a multi-lingual databases default language directly -- though I'm sure it would be easy enough to find where the data behind this property is stored.  For a single-language database that happens to be based on a template that is AVAILABLE in multiple languages (all single-language translations of each other), there is ABSOLUTELY NO WAY to tell what language the current database is translated to, other than a variantion of the error message trick -- if you know that some form name or the text of some patricular spot is X in English and Y in Portuguese, then you can simply test what the current value is.  of course, if the database ever changes, your test may fail.

Now, I don't know how your database is designed, and I don't know why you are trying to do this.  But it sounds like you are NOT trying to modify the form at run time (i.e., every time the user opens it), which seems to mean that you are expecting a certain file to have a certain design that you can then modify one time.  That sounds like a single alnguage database.  Further, it sounds like it is the user's mail file or some other standard database, so I'm guessing you have some new system you are trying to install on the user workstation, and wish to modify "the rest of Notes" to work with your system.

Well, sorry, but it looks like you may be doing this is a messy way, and probably not the best design to begin with.  But putting that aside, either you support multiple languages or you don't.  if you do, you have to acocunt for all of them, and be graceful when you don't recognize something (like a custom version of the file already on the user workstation or a newer or older version of Notes than you've tested against). Otherwise, give it up.

Author Comment

ID: 12672319
Hi qwaletee,
I think I am not able to communicate the exact problem I am facing. But your post given me enough insight.
I'll just explain what I am doing -
Look if you go to following link you can choose a particular "Language" for Notes Setup.
Now assuming that I select French as Language, Downlaod the trial setup and install it (Note- Its not connected to a Domino Server). When you try to enumerate all items using  - NIFFindDesignNote, NSFItemInfo etc
Then the name of item appears to be in French.

Well I have thought of a temporary simpler workaround to this. Just making things more generic sometimes is difficult :-)

If you have any thought on this then please let me know.
LVL 31

Accepted Solution

qwaletee earned 1000 total points
ID: 12692764
Yes, but I think you missed the point.  

You never state it outright, but I assume that you are talking about the mail database design.  The design element names of the mail template are NOT associated with the client language version, they are associated with the database design.  The database design is associated with teh mail template file used to generate the mail file.  That step is usually done by a corporate mail administrator, not the user.  In your case, since you downloaded a standalone version, it is the user's own client that generated the file, and so the mail file was based on teh template that came with the client, and since the client was French, the template that came with it was French.  But that is NOT the typcial setup at all!

Even with the user's own client generating the mail file, it does not have to match the client version.  I know people using non-English versions of Notes, but who use the OpenNTF Mail Experience template instead of the template Lotus installs.  Guess what?  French client, English language template -- and that's with the user controlling teh mailbox design (as in your case), not a corporate mail administator.

Or, look at the place I'm working right now.  Mst of the company uses English to conduct business -- except for the Montreal office.  Some people there use the French client... but their mailboxes are all English, because the company does not want to support multiple mail templates, and English/French versions would be separate, and sometimes conflicting.  So, everyone has an English mail file, even if the client install was French.

So, my thought would be that you better think this through, and make sure you really want to do what you are doing,and support it for multiple languages. Because I wouldn't.  I'd find a different way.

Author Comment

ID: 12693105
Thanks qwaletee. This is really very helpful for me. :-)
Have a great day!

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses
Course of the Month18 days, 15 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question