Announcement

Collapse
No announcement yet.

Multilingual software..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Hello Edwin,

    If I understand you correctly, you mean that my application does not use such languages like Russian, Greek or Chinese?
    In that case you are right. It's all Latin, indeed.

    ------------------
    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

    Comment


    • #22
      >No, it is not enough.
      >You need control created as unicode class too.

      Really?
      (PB/WIn 8.03)
      Code:
      ' test_ddtw.bas
      #COMPILE EXE
      #DIM ALL
      #INCLUDE "Win32API.INC"
      
      %ID_LABEL      = 101&
      %ID_TIMER      =  678&
      %SUB_COUNTER   = 7
      
      DECLARE FUNCTION SetWindowTextW LIB "User32.dll" ALIAS "SetWindowTextW" (BYVAL hWnd AS LONG, BYREF sz AS ANY) AS LONG
      
      FUNCTION PBMAIN () AS LONG
          
          LOCAL hDLG AS LONG
      
          DIALOG NEW 0, "Test Unicode call on DDT dialog", 10,10, 200,100  TO hDLG
          ' add ANSI static control
          CONTROL ADD LABEL, hDlg, %ID_LABEL, "", 10,10,180,12
          
          DIALOG SHOW MODAL hDlg CALL DialogProc
          
      
      END FUNCTION
      
      CALLBACK FUNCTION DialogProc () AS LONG
      
       LOCAL iCount AS LONG, s AS STRING
       
         SELECT CASE AS LONG CBMSG
             CASE %WM_INITDIALOG
                 CONTROL SET TEXT CBHNDL, %ID_LABEL, "Initial Text"
                 SetTimer CBHNDL, %ID_TIMER, 1000&, %NULL
               
                 
             CASE %WM_TIMER
                  CONTROL GET USER CBHNDL, %ID_LABEL, %SUB_COUNTER TO iCount
                  INCR iCount
                  CONTROL SET USER CBHNDL, %ID_LABEL, %SUB_COUNTER, icount
                  
                  s = USING$ ("Counters:  #,  ", iCount)
                  
                  IF Icount MOD 2 THEN
                  ' use ansi string
                     S = S & "Using Control Set Text"
                     CONTROL SET TEXT CBHNDL, %ID_LABEL, s
                  ELSE
                      ' use unicode string
                     S = S & "Using SetWindowTextW"
                     S = S & $NUL     ' required to make it nts
                     S = UCODE$(s)
                     SetWindowTextW GetDlgITem(CBHNDL, %ID_LABEL), BYVAL STRPTR(S)
                  END IF
                  
            CASE %WM_DESTROY
                   KillTimer CBHNDL, %ID_TIMER
                  
        END SELECT
        
      END FUNCTION
      MCM
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #23
        That's not a real test imo since you are not really setting unicode characters, i mean using a 100% two byte based characterset.
        Converting to ansi to uni might not be the same for this.
        We really need to test this on such Windows imo.


        ------------------
        http://www.hellobasic.com
        hellobasic

        Comment


        • #24
          Originally posted by Edwin Knoppert:
          would an unicode SDK window viable for ansicode use?
          (I mean vice versa?)
          Yes, no problem with that.


          Originally posted by Michael Mattias:
          Really?
          really

          if you change your text to russian you will see surprize
          becouse control is ANSI-class and OS converted it again to ANSI
          with default regional setting.


          ------------------
          -=Alex=-



          [This message has been edited by Aleksandr Dobrev (edited January 07, 2007).]
          -=Alex=-

          Comment


          • #25
            Geeeeh

            ------------------
            http://www.hellobasic.com
            hellobasic

            Comment


            • #26
              I was thinking, under NT it should be reasonably simple to hook calls like:

              CreateDialogIndirectParamA() and such..

              maybe this is an option?


              ------------------
              http://www.hellobasic.com
              hellobasic

              Comment


              • #27
                >That's not a real test imo since you are not really setting unicode characters

                Well here in flyover country we rubes kinda 'spect that UCODE$ creates, like, unicode, you know?

                > if you change your text to russian

                Wait just a minute.. Russian.. Egbert and Edwin are in Holland, Schullian's in Greece...

                Damn foreign conspiracy, that's what it is. Let me call Homeland Security, we'll put an end to this.

                Michael Mattias
                Tal Systems (retired)
                Port Washington WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                • #28
                  >Egbert and Edwin are in Holland

                  Holland?? nah.. we are in the Netherlands
                  (So i've heard)

                  ------------------
                  http://www.hellobasic.com
                  hellobasic

                  Comment


                  • #29
                    Geez...

                    I'm lost and there are too many cross conversations for me to understand
                    anything going on here.. I'll start with finding out what UNICODE
                    actually is.. I can't see why you need unicode to change English to Dutch.

                    Why do you need UNICODE to change:

                    "Help" to "Hulp" to "Hilfe"

                    Browsers do it.. And its been done on paper and computer long before
                    Windows and all this crap..

                    Thanks anyway..

                    Tye

                    ------------------
                    Explorations v7.96 RPG Development System http://www.explore-rpg.com

                    [This message has been edited by Tyrone W. Lee (edited January 07, 2007).]
                    Explorations v9.10 RPG Development System
                    http://www.explore-rpg.com

                    Comment


                    • #30
                      Originally posted by Michael Mattias:
                      Wait just a minute.. Russian.. Egbert and Edwin are in Holland, Schullian's in Greece...
                      Damn foreign conspiracy, that's what it is. Let me call Homeland Security, we'll put an end to this.
                      Michael !!!!

                      The best phrase, thank you !!! :-|






                      ------------------
                      -=Alex=-
                      -=Alex=-

                      Comment


                      • #31
                        >I can't see why you need unicode to change English to Dutch.

                        Indeed but at some point Windows wanted to access the azian market and supporting their local language as well (instead of Englisch only).
                        The ascii set is very limited and therefore, since Windows 95, they implemented unicode support.
                        This means instead of a single byte they extended it to two bytes to so you'll get 65k combinations instead of 256.
                        (Chinese have more than 1000 symbols??)

                        To remain backwards compatible they kept support for single byte as well.

                        >Browsers do it.. And its been done on paper and computer long before Windows and all this crap.
                        Hmm, not so.. afaik the original html language was 127 chars aka 7bit, not even 8bit!
                        Nowadays there is utf8 and utf16 and so on.
                        BROWSERS are prepared to handle the unicode.
                        But then there is the language issue, the unicode value must 'fit' the users language.
                        Imo that's the reason i can't correctly read azian websites.
                        I'm not so clever with all of this but maybe someone can explain this better.



                        ------------------
                        http://www.hellobasic.com
                        hellobasic

                        Comment


                        • #32
                          Originally posted by Tyrone W. Lee:
                          I can't see why you need unicode to change English to Dutch.
                          Why do you need UNICODE to change:
                          "Help" to "Hulp" to "Hilfe"
                          No. Lets wait for german people, they have umlaute

                          If seriously, then european languages has a few chars
                          with different view, but others has a lot.
                          IMHO ignoring fast growing countries it is loosing market.
                          Few years ago salary in Russia was ~$100-$200/month.
                          Right now to be able afford live in a Moscow people need
                          at least $1000-$1200/month. Thats mean, if a few years ago
                          russians need make a cracks to be able afford some programs,
                          but right now they will prefer to pay for programs than spend
                          sleepless nights time for cracking some programs.

                          So its up to developer ignore that countries or not.

                          Browsers do it..
                          Browsers is unicode application...

                          ------------------
                          -=Alex=-
                          -=Alex=-

                          Comment


                          • #33
                            Originally posted by Edwin Knoppert:
                            Imo that's the reason i can't correctly read azian websites.
                            To be able display correctly foreign languages you just need
                            go to Start->Control Panel->Regional and Language options
                            then switch to Advenced tab and select as many languages as
                            you want support.

                            I'm not commercial specialist, but IMHO ignoring
                            countries as Japan,Korean,China,Turkish,Finland,Sweden,France, Russia....

                            Ok, thats up to ... software maker, M$ made their choice,
                            and then less compititors on that markets, than better for
                            that who understand it



                            ------------------
                            -=Alex=-
                            -=Alex=-

                            Comment


                            • #34
                              Agreed but it's also not so trivial.
                              You'll need translators and when things are added these needs to be translated as well.
                              Iow, it's not simple translate and sell issue.

                              ------------------
                              http://www.hellobasic.com
                              hellobasic

                              Comment


                              • #35
                                Tyrone (if you're still with us),

                                Assuming that the program you write is being used in the country
                                that uses the language you want to display in then you don't need
                                unicode. What looks like gobbledegook on your computer will read
                                correctly on theirs. That's the good news.

                                The bad news is that you may not be able to see the text correctly
                                on your computer but.... even if you could see it, could you read it
                                and be able to correct it? The word 'conundrum' comes to mind here.

                                Michael: Yes, you've caught us! Call the cops! Ya' just have to
                                keep an eye on us 59 year old, Caucasian males wearing sneakers.



                                ------------------
                                --
                                C'ya
                                Don
                                don at DASoftVSS dot com
                                http://www.DASoftVSS.com
                                C'ya
                                Don

                                http://www.ImagesBy.me

                                Comment


                                • #36
                                  Does anyone still wonder why I suggest all PB programmers learn to write applications 'SDK-style' at some point?
                                  It is still a difference if you work with unicode APIs or if you have a compiler like MSVC++ which provides you with
                                  unicode variables. It is quite boring to use unicode with ASCIIZ strings.

                                  I also had to translate a PB application to unicode, it had to be japanese. For the strings I have created a unicode CSV file
                                  which contains the strings (I use that way because the CSV file is exported by Excel which can be easily edited by
                                  some non-programmer which makes the translation).

                                  For the unicode support, I have created a layer which dynamically replaces the calls to ansi APIs to unicode APIs if
                                  unicode is available on the system (this isn't the case on most Win9x systems). This means that I can use unicode with DDT.

                                  This unicode tool is not complete or bug-free, but my application doesn't have so many dialogs so with some manual corrections
                                  it works quite well.

                                  Lothar

                                  ------------------

                                  Comment


                                  • #37
                                    i have posted my unicode ddt tool at:
                                    http://www.powerbasic.com/support/pb...ad.php?t=25069


                                    ------------------

                                    Comment

                                    Working...
                                    X