Using Language option


Recommended Posts

Hi,

On the Descriptive Text Component it seems difficult to align as the language changes unless I pad out the translation with leading spaces to ensure that the colon that I have added lines up vertically with the captions of the variable value components below it. There doesn't seem to be an alignment specifier so what value should I set in the Align Field of the Style group of the Properties for this component.

Martin

Link to comment
Share on other sites

Date/Time edit: I'm saying change the format to use numbers instead of month names, and then either indicate the month / day ordering using a label, or dynamically change it using the strDateFormat property based on the user's preference. So 3/31/11 or 31/3/11 instead of March 31, 2011

Align: 0 = auto, 1 = left, 2 = center, 3 = right

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

I seem to have developed a problem with the language switching. I have the two arrays of day names and month names as you suggested ( I called them dNames and mNames respectively) At initialization they are populated as dNames = {"@Sun","@Mon","@Tue","@Wed","@Thu","@Fri","@Sat"}

and mNames = {"","@Jan","@Feb","@Mar","@Apr","@May","@Jun","@Jul","@Aug","@Sep","@Oct","@Nov","@Dec"}

When the user wants to change the language he invokes a pop up page that has a combo box, populated by the menu system used, with the languages available. The Menu system clears the combo box, loads the first element with "@Select", the second element with "@English" and the successive elements with the contents of a list of the languages obtained from System.GetLanguageList().

Pressing a button beside the combo box captioned '@Confirm' has as its first action 'Submit' followed with a second action (As long as there is a valid choice made) which is a Quick Sequence that first resets the two above arrays and then sets System.Language = Choice Made from the combo box.

All of the text on the screen changes to the new language with the exception of the week and month names even though they have theoretically been reset to the English (default) with the leading '@'

Watching the two arrays shows no change and each element has no leading '@'

If I press the button a second time with the same language selected THEN the month and day change as they should. I just don't understand why the same quick sequence changes things a second time but not the first. Watching the arrays as the second press shows that the arrays change as they should except that there is no leading '@'

I even tried the rather ludicrous looping around the resetting of the two arrays while one of them had not been reset! Even with this it still needs two presses of the button to reset the day names and month names as displayed and watched. Duplicating the leading '@' displays the '@' on the screen.

Can you shed any light on what is wrong?

Martin

Link to comment
Share on other sites

Hi,

Any suggestions for getting the System.MessageBox to display in the set language?

I have tried System.MessageBox("@Select Language") and setting a private string SystemMessage = "@Select Language" and then calling system.MessageBox(SystemMessage) and duplicating the leading '@' in both methods but this simply displays the leading '@'

Martin '

Link to comment
Share on other sites

Part 1:

You are doing it in the wrong order. You need to change the language first, then reset the array. That's why it does it the second time around.

Part 2:

Works fine for me. I did: system.messageBox("@abc") which displayed "abc". Then I created another language, assigned the phrase "abc" to "def", selected that language and did system.messageBox("@abc") again and it displayed "def"

Link to comment
Share on other sites

  • 2 years later...

Hello,

 

I would like to ride on this topic for my question.

 

I am trying to do a translation from English alphabets to Chinese Characters. Is it possible? I could input chinese characters in the translated phase settings but the translation does not happen as the word becomes blank after i change the system language.

 

Please advise.

 

Thanks

Ben

Link to comment
Share on other sites

You may need to set the CodePage DAQFactory uses.  You can do this by creating a DWORD registry entry called "CodePage".  The location is:

 

hklm/software/DAQFactory/Control

 

Note that on x64 systems, its:

 

hklm/software/wow6432Node/DAQFactory/Control

 

Search the internet to determine the proper code page.

 

Also, note that you may have to be ensure that the font you are using supports your characters.  

 

Can you please post the characters you are trying to use?  

Link to comment
Share on other sites

  • 2 weeks later...

You may need to set the CodePage DAQFactory uses.  You can do this by creating a DWORD registry entry called "CodePage".  The location is:

 

hklm/software/DAQFactory/Control

 

Note that on x64 systems, its:

 

hklm/software/wow6432Node/DAQFactory/Control

 

Search the internet to determine the proper code page.

 

Also, note that you may have to be ensure that the font you are using supports your characters.  

 

Can you please post the characters you are trying to use?  

 

Thank you for the advise. I have managed to get it working after creating the code page.

Link to comment
Share on other sites

  • 2 years later...

Hi, I'm trying to do the same thing with Japanese characters. 

I've used regedit to go to the location you specify: hklm/software/DAQFactory/Control

in there i created a new REG_DWORD with the decimal value 1041 (for japanese)

Then restarted daqfactory but when i add a phrase to the language (using microsoft IME) it just displays "??"

I selected table font @Arial Unicode MS in preferences but no change.

Any ideas?

I need Japanese Kanji support for buttons such as 'save' 保存

 

cheers

 

 

 

AzeoTech, on 18 Oct 2013 - 2:28 PM, said:

You may need to set the CodePage DAQFactory uses.  You can do this by creating a DWORD registry entry called "CodePage".  The location is:

 

hklm/software/DAQFactory/Control

 

Note that on x64 systems, its:

 

hklm/software/wow6432Node/DAQFactory/Control

 

Search the internet to determine the proper code page.

 

Also, note that you may have to be ensure that the font you are using supports your characters.  

 

Can you please post the characters you are trying to use?  

Link to comment
Share on other sites

Alas, DAQFactory is not Unicode, so the font you selected probably won't work.  You'll need a japanese font.   For example, when I go to paint and paste the characters you indicated, it automatically switched my font to Microsoft YaHei.   You also might try code page 932.  I can't guarantee that it will work, but those would be the things I'd try.  I'd also try setting the caption using script instead of through the properties window.  Or possibly through the docking properties window.  

 

 If you can't get it to work, you'll have to create images of the japanese words in Microsoft Paint and then paste them on top of the buttons.  Certainly not as convenient, but it will definitely work. 

 

Also, it would help us if you could post a .ctl document with your attempts.  When I copy/paste out of the browser, it wants to paste the characters as UTF-8 which I'm sure DAQFactory won't take.  But, if you were to type the japanese characters directly into DAQFactory, it may work better.  But alas I can't type japanese!

Link to comment
Share on other sites

  • 6 years later...

Hello,
On a PC with Window 10 configured in Chinese, I tried to create the REG_DWORD with the code page 936.
It didn't work and yet, I tried several fonts. I only see ???? instead of the Chinese symbols

Is it possible to display in the supervision and write in Chinese files with DAQFactory?

Link to comment
Share on other sites

As mentioned in the previous posts, DAQFactory is not unicode so support for extended character sets is somewhat limited.  The selected font is a big source of problems, but there are still limitations.  Often on has to use images of text instead.  This is something we would like to fix, but there are some significant challenges to ensure backwards compatability.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.