Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    7

    Help with determining OS Language

    Hi everyone-

    I'm evaluating AMS 5 and I'm having some trouble determining the OS language. Basically, I want to determine if the OS language is Japanese and hide a button if it is. My programming skills are very limited to please be gentle

    I understand that I can use the 'user_language = System.GetDefaultLangID;' function but I'm not sure how exactly I'm supposed to extract the data from the table. Any sample source code would really help out.

    Thanks!

  2. #2
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Try this out (and then modify it to your needs):

    Code:
    --The decimal number 17 that would be returned on a Japanese 'default' language computer, is the Windows operating system language ID code 
    
    language_info = System.GetDefaultLangID();
    	if language_info.Primary == 17 then
    		Dialog.Message("Computer's Default Language Check...", "This computer's default language is:  Japanese");
    	else
    		Dialog.Message("Notice...", "This computer does not have Japanese set as its default language!");
    	end
    
    
    
    
    -- BELOW IS STRAIGHT FROM AMS 5's 'HELP' SECTION!
    
    --Gets the primary and secondary language ID code and stores them in the table called "language_info." 
    
    --These values could be accessed by referencing language_info.Primary and language_info.Secondary.
    Credit: Some goes to the AMS 5's (Pro for this example) 'HELP' section.
    Intrigued

  3. #3
    Join Date
    Mar 2004
    Posts
    7
    Thanks, Intrigued -- that helps out a lot. I had the same logic except I was only using '=' instead of '=='. By the way, how did you know wheather or not you should use the 'decimal' number instead of the hex number? Or could I use either?

    Thanks!

  4. #4
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    I felt that decimal would work because of using decimal values in other situations with regards to AMS 5.

    The Hex should work as well though I have not tried such.

    I am glad that we found a solution that works or helps find the actual solution your project needs!
    Intrigued

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts