Find Lotus Notes Language

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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bozzie4IT ArchitectCommented:
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 ?


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.
Santino_kAuthor Commented:
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
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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.
Santino_kAuthor Commented:
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.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Santino_kAuthor Commented:
Thanks qwaletee. This is really very helpful for me. :-)
Have a great day!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.