Gammatech

Members
  • Posts

    142
  • Joined

  • Last visited

Everything posted by Gammatech

  1. 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 '
  2. 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
  3. 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
  4. Sorry, I don't understand. Do you mean I can't use the DateTime edit box?
  5. Another Query. On the DateTime Edit Box how does the Date Format have to be set up? prior to the change to using the language option I had: "ddd d MMM ',' yyyy" to give me for instance "Thu 17 Mar , 2011" Now when a particular language is invoked I would want the format the same but the abbreviated day of the week taken from my array of week day names and similarly the month from the array of month names. I tried a number of combinations of the array names but this produced the interesting: 23 23Na 5e22 5Na 5e22 , 2011 So have you any suggestions for this O wise one? TIA Martin
  6. Hi, I have found a crude fix in that the action to apply whichever language is selected sets the WeekDayNames array to have the correct content without any leading '@' so I am not using the language option for these direct replacements from the look up table. It has the disadvantage that if another language is added via the Tools>Languages>Add route I would also have to add the appropriate Case statement and array of words so it is rather dirty in comparison to your smooth method for normal language transition but I suppose I'll have to live with it unless you can point to a better way. I need to be able to switch back to English in case one of our Engineers goes out to the foreign country to do some work on the system and then he can reset it to the local language when he leaves. Martin
  7. Hi again, My array of weekday names was initialized to {"@Sun","@Mon","@Tue",etc} and in the language list I added the translations for these 7 words. After selecting the language the contents of the array show in the watch window as {"Ned","Pon","Uto",etc} which is as they should accept that the leading '@' has been stripped. When I reselect English as the language, by setting to one that does not exist, various words that I have translations for change back to English but the content of the week day names does not so that in those places where I am displaying an element from the array this stays in the foreign language. Does this point to needing a double '@' before my word? or am I doing something else wrong. As the array has actually changed its contents I can't see how there is any way I can change back to the default language. I would have expected my array to always have the default week day names with the leading '@' character to trigger the change over if the language is NOT English when one of these words in the Array are used. Martin
  8. Yes, formatDateTime("%m",systime()) returns 01,02,03,...11,12,01 as the months go by, whereas the formatDateTime("%w",systime()) returns 0,1,2,...5,6,0 as the days go by. To get round this I have inserted an empty element "" before "@Jan" in my array. Thinking about it, it is obvious as the function is supposed to return the month number which is always indexed from one for January whereas the days of the week have no hard and fast indexing (which often causes problems). In this case Sunday is zero. Martin
  9. I made the arrays as you suggest except I made them string type as surely they should be. WeekDayNames[formatDateTime("%w",systime())] gives the correct element out of the array but has dropped the leading '@' symbol so presumably I will have to duplicate this in my string array? The Month translation seems to be indexed strangely so that monthNames[formatDateTime("%m",systime())] gives one month in advance of the current month ie Apr rather than Mar for today's date (17th March) without the leading '@'. FormatDateTime("%m",Systime()) returns 03 in the Watch window so is this returning a string? FormatDateTime("%w",SysTime()) returns 4 as expected for Thursday. Martin
  10. Can you explain how to do it with a look up table as I want the selection in the document so that selecting a language will change the weekday and month names. I will populate a combobox from the language list and set the required language from that so that can be the indicator as to which table to use. I don't want to mess about with the windows settings Thanks, Martin
  11. Hi, In several places I use the FormatDateTime function to display the current system time using: Display = FormatDateTime("%a %d %b %Y %H:%M:%S", SysTime()) How do I change the default weekdays and month names to the chosen language? Thanks, Martin
  12. OK, I'll have to go back to the version I had before I started on the language option. Is it possible to add this to the 'Wish List' for a later release? Is there any way to get the correlation between space on screen and font point size? In order to do a translation our agent needs to know how many characters he can use for a particular phrase or word. Where I have for example 250 pixels between the left and right positions on screen, I have gleaned by experimentation that the 25 point Microsoft sans serif font needs between 9 and 12 pixels per character so that space will hold a maximum of about 20 characters. 30 point Arial seems to need about 13 pixels per character whilst 16 point Arial seems to need about 8 pixels per character. Some computer languages have a function to give the pixels for height or width for a particular character. For example the TextWidth and TextHeight functions in Borland Pascal. Martin
  13. Hi, Is there any way I can delete entries in the language combo box of the language settings pop up or do I have to go back to the state before I started on language additions? Martin
  14. Thanks for that a double ampersand works fine. Is there any way I can delete my duplicated entries in the language combo box of the language settings pop up. If I were to have additional columns, beyond the first two required ones in the .CSV file to import the translations would this upset the import? In order for our agent to do the translation effectively he needs to take account of the space available for the word or phrase and its context so I was going to include this in the file I send to him. If there is likely to be a problem with the import I will strip the additional data after he has completed the translation. Thanks, Martin
  15. Hi, Whilst editing my Captions, Text Components and Units to have the "@" in front of each I came across a peculiarity! I attempted to edit a text component contents from "Set Ash and Moisture" to "Set Ash & Moisture" so that any translation that was longer would have more space. Although the change shows correctly in the Text component edit window the " & " (ampersand with a space either side) displays as a single space followed by a faint underscore and no trailing space. Any suggestions? Martin
  16. Hi, With the Code Page patch on my version (5.84 build 1636) Is there a way to change code pages from script? I have added the DWORD CodePages into the Registry. Is there a way to set the words or abbreviations used for day names and month names in the FormatDateTime function and the graph component. Thanks, Martin
  17. Hi, Whilst messing about with the Language function I have managed to make duplicate entries in the language combo box of the language settings pop up so that it displays when expanded 'German', 'Serbian', 'Serbian', 'Polish', 'Spanish','German' etc. Each entry seems to have the same contents but I would like to delete the duplicates.The system function System.GetLanguageList returns an array with the duplicate entries so when I use it to populate my own combo box I get duplicates. There is a delete button to delete an individual selected phrase but (for safety?) there is no obvious way to delete a whole language entry. Any suggestions? Martin
  18. Hi, The thread says there is a patch that will be included in the next release. I have V5.84 build 1636 whereas the thread starter had V5.79 build 1574 so does my version include the patch or not? If the patch is included in my build then do I need the new DWORD value at HKEY_LOCAL_MACHINE/Software/DAQFactory/Control and if so which code page number should I enter for at least European characters as this should cover our Balkans agent and Iberia so probably South America as they tend to use Spanish and Portuguese characters. I suppose Cyrillic characters will have to wait unless there is a way to write a new code page number from script. You point to Unicode support in V6.00 and of course the graphics update. I wouldn't want to deprive you of the odd crust of bread now and then but is there any sign of V6.00 on the horizon? The last post in January this year implied that there may be some hardware problems in displaying the correct character set, any conclusions on this? TIA Martin
  19. Hi, I have started adding languages to my document using the '@' symbol in front of words and phrases and wondered how the character set for other languages is supported. Where there are national character sets within Windows is it necessary to switch code pages? If our agent in the foreign country builds the suggested CSV file with my phrase in the first column and his translation in the second column (probably he will have his national character set active on his computer) will his translations display correctly? I am thinking of the modified characters for some of the European countries where there are various accents and tilde added to the character and then in the more extreme case the Russian character set and ultimately Chinese, Japanese or Arabic etc. Martin