How to build the multi-language application?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • yxq

    #1

    How to build the multi-language application?

    Hello,
    I want to build the multi-language application with the xml file, how to do?
    could anyone tell a sample?
    Thank you


  • Herfried K. Wagner [MVP]

    #2
    Re: How to build the multi-language application?

    "yxq" <gayxq@163.nets chrieb:
    I want to build the multi-language application with the xml file, how to
    do? could anyone tell a sample?
    Why not use 'My.Resources' and custom "Resources.<cul ture name>.resx" files
    (which will be compiled and embedded automatically when building the
    project)?

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    • =?Utf-8?B?WVhR?=

      #3
      Re: How to build the multi-language application?

      Thank you, where can find the samples?

      "Herfried K. Wagner [MVP]" wrote:
      "yxq" <gayxq@163.nets chrieb:
      I want to build the multi-language application with the xml file, how to
      do? could anyone tell a sample?
      >
      Why not use 'My.Resources' and custom "Resources.<cul ture name>.resx" files
      (which will be compiled and embedded automatically when building the
      project)?
      >
      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
      >
      >

      Comment

      • rowe_newsgroups

        #4
        Re: How to build the multi-language application?

        On Oct 25, 8:23 am, "yxq" <ga...@163.netw rote:
        Hello,
        I want to build the multi-language application with the xml file, how to do?
        could anyone tell a sample?
        Thank you
        Globalization is a topic too large for this newsgroup, I suggest you
        find a good book on the topic or check out MSDN for some information.

        Thanks,

        Seth Rowe [MVP]

        Comment

        • Screaming Eagles 101

          #5
          Re: How to build the multi-language application?

          "YXQ" <YXQ@discussion s.microsoft.com schreef in bericht
          news:5685F194-9D94-4668-B201-E15A4229741C@mi crosoft.com...
          Thank you, where can find the samples?
          >
          "Herfried K. Wagner [MVP]" wrote:
          >
          >"yxq" <gayxq@163.nets chrieb:
          I want to build the multi-language application with the xml file, how
          to
          do? could anyone tell a sample?
          >>
          >Why not use 'My.Resources' and custom "Resources.<cul ture name>.resx"
          >files
          >(which will be compiled and embedded automatically when building the
          >project)?
          >>
          >--
          > M S Herfried K. Wagner
          >M V P <URL:http://dotnet.mvps.org/>
          > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
          >>
          Short description on how I do it, this could help for a start :
          - I add a resource file for each language, for instance English.Resx,
          Dutch.Resx, etc....

          - I add all components which do have a Text property, such as labels for
          instance... but you can also add standard strings to use in msgboxes...
          Example : in Resource File : column Name "btnAdd" (this is the same in
          all resource files),
          value "Add..." of course different value in other languages.

          - Some code then in a separate module to open the resource file and read it
          Declaration :
          'Application Language
          Public rm As Resources.Resou rceManager

          'Function
          Public Function getRMValue(ByVa l strValue As String)
          Dim strLanguage As String

          If IsNothing(rm) Then
          'Get system language
          strLanguage =
          System.Globaliz ation.CultureIn fo.CurrentCultu re.ToString.ToU pper.Substring( 0,
          2)

          'Set resource manager
          If strLanguage = "EN" Then
          rm = My.Resources.En glish.ResourceM anager
          Else
          rm = My.Resources.Du tch.ResourceMan ager
          End If
          End If

          getRMValue = rm.GetString(st rValue)
          End Function

          - In the forms :
          btnAdd.text = getRMValue("btn Add")

          Hope this helps a bit
          Phil


          Comment

          • Cor Ligthert[MVP]

            #6
            Re: How to build the multi-language application?

            yxq

            In my opinion is the most simple way to create a DataSet and a DataGridView
            You can read that from disk as ds.ReadXML
            do your changes using the DataGridView and write it back again as ds.ReadXml


            The RESX files are difficult to deploy, while you can only use it for the
            text of a control.

            jmo

            Cor


            "yxq" <gayxq@163.nets chreef in bericht
            news:enfx8xpNJH A.588@TK2MSFTNG P06.phx.gbl...
            Hello,
            I want to build the multi-language application with the xml file, how to
            do? could anyone tell a sample?
            Thank you
            >

            Comment

            • Herfried K. Wagner [MVP]

              #7
              Re: How to build the multi-language application?

              "Cor Ligthert[MVP]" <notmyfirstname @planet.nlschri eb:
              The RESX files are difficult to deploy, while you can only use it for the
              text of a control.
              Why deploy ResX files? Localization is typically done at design time and
              not after shipping the product on the client's PC. ResX files are compiled
              into satellite assemblies automatically.

              --
              M S Herfried K. Wagner
              M V P <URL:http://dotnet.mvps.org/>
              V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

              Comment

              • Cor Ligthert[MVP]

                #8
                Re: How to build the multi-language application?

                Herfried,


                Dit you ever heard of an South London guy with the name Nak.

                He tried the same as you said, at the end he told he was using what I said
                now.

                But you don't know who that is of course.

                Cor

                "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
                news:uqN$TWFOJH A.3968@TK2MSFTN GP02.phx.gbl...
                "Cor Ligthert[MVP]" <notmyfirstname @planet.nlschri eb:
                >The RESX files are difficult to deploy, while you can only use it for the
                >text of a control.
                >
                Why deploy ResX files? Localization is typically done at design time and
                not after shipping the product on the client's PC. ResX files are
                compiled into satellite assemblies automatically.
                >
                --
                M S Herfried K. Wagner
                M V P <URL:http://dotnet.mvps.org/>
                V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                Comment

                • Herfried K. Wagner [MVP]

                  #9
                  Re: How to build the multi-language application?

                  "Cor Ligthert[MVP]" <Notmyfirstname @planet.nlschri eb:
                  Dit you ever heard of an South London guy with the name Nak.
                  >
                  He tried the same as you said, at the end he told he was using what I said
                  now.
                  >
                  But you don't know who that is of course.
                  Well, I remember him.

                  Nevertheless, ResX works just fine, especially because it supports
                  versioning and signing of the resource satellite assemblies. However, it's
                  not the way to go if the /user/ should be able to localize parts of the
                  application. Otherwise I am not aware of any problems related to ResX
                  files.

                  --
                  M S Herfried K. Wagner
                  M V P <URL:http://dotnet.mvps.org/>
                  V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                  Comment

                  • Screaming Eagles 101

                    #10
                    Re: How to build the multi-language application?


                    "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atschr eef in bericht
                    news:uKhw59JOJH A.4372@TK2MSFTN GP04.phx.gbl...
                    "Cor Ligthert[MVP]" <Notmyfirstname @planet.nlschri eb:
                    >Dit you ever heard of an South London guy with the name Nak.
                    >>
                    >He tried the same as you said, at the end he told he was using what I
                    >said now.
                    >>
                    >But you don't know who that is of course.
                    >
                    Well, I remember him.
                    >
                    Nevertheless, ResX works just fine, especially because it supports
                    versioning and signing of the resource satellite assemblies. However,
                    it's not the way to go if the /user/ should be able to localize parts of
                    the application. Otherwise I am not aware of any problems related to ResX
                    files.
                    >
                    --
                    M S Herfried K. Wagner
                    M V P <URL:http://dotnet.mvps.org/>
                    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                    I use ResX files and I am very pleased with them, and you can use them for
                    more than just text on controls,
                    you can also put al kind of strings in them and use those after that in
                    messageboxes, etc...
                    Phil


                    Comment

                    • Cor Ligthert[MVP]

                      #11
                      Re: How to build the multi-language application?

                      But in my idea do you have to fill the text yourself, in other words, you
                      can not take the help from others to fill all the languages. Let say the
                      official languages of the EU then it are about 40.

                      For total America there is probably no problem as there are afaik only 5
                      written languages.

                      English, Spanish, Portugese, French and Dutch.

                      Cor

                      " Screaming Eagles 101" <see_my_site@on line.pleaseschr eef in bericht
                      news:ge6f6k$vu1 $1@aioe.org...
                      >
                      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atschr eef in bericht
                      news:uKhw59JOJH A.4372@TK2MSFTN GP04.phx.gbl...
                      >"Cor Ligthert[MVP]" <Notmyfirstname @planet.nlschri eb:
                      >>Dit you ever heard of an South London guy with the name Nak.
                      >>>
                      >>He tried the same as you said, at the end he told he was using what I
                      >>said now.
                      >>>
                      >>But you don't know who that is of course.
                      >>
                      >Well, I remember him.
                      >>
                      >Nevertheless , ResX works just fine, especially because it supports
                      >versioning and signing of the resource satellite assemblies. However,
                      >it's not the way to go if the /user/ should be able to localize parts of
                      >the application. Otherwise I am not aware of any problems related to
                      >ResX files.
                      >>
                      >--
                      >M S Herfried K. Wagner
                      >M V P <URL:http://dotnet.mvps.org/>
                      >V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
                      >
                      >
                      I use ResX files and I am very pleased with them, and you can use them for
                      more than just text on controls,
                      you can also put al kind of strings in them and use those after that in
                      messageboxes, etc...
                      Phil
                      >

                      Comment

                      • Screaming Eagles 101

                        #12
                        Re: How to build the multi-language application?

                        "Cor Ligthert[MVP]" <notmyfirstname @planet.nlschre ef in bericht
                        news:%23MZuhGPO JHA.2404@TK2MSF TNGP05.phx.gbl. ..
                        But in my idea do you have to fill the text yourself, in other words, you
                        can not take the help from others to fill all the languages. Let say the
                        official languages of the EU then it are about 40.
                        >
                        For total America there is probably no problem as there are afaik only 5
                        written languages.
                        >
                        English, Spanish, Portugese, French and Dutch.
                        >
                        Cor

                        That would be different, we only need English, Dutch and Portuguese, so not
                        a real problem.


                        Comment

                        • Herfried K. Wagner [MVP]

                          #13
                          Re: How to build the multi-language application?

                          "Cor Ligthert[MVP]" <notmyfirstname @planet.nlschri eb:
                          But in my idea do you have to fill the text yourself, in other words, you
                          can not take the help from others to fill all the languages. Let say the
                          official languages of the EU then it are about 40.
                          You can send the ResX files to a localization agent who can localize them
                          using VS Express. This way even images and other types of resources can be
                          localized. Even Windows Forms can be localized by another company using
                          "WinRes.exe ".

                          --
                          M S Herfried K. Wagner
                          M V P <URL:http://dotnet.mvps.org/>
                          V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                          Comment

                          • Grant Frisken

                            #14
                            Re: How to build the multi-language application?

                            On Oct 29, 12:13 am, "Herfried K. Wagner [MVP]" <hirf-spam-me-
                            h...@gmx.atwrot e:
                            >
                            You can send the ResX files to a localization agent who canlocalizethem
                            using VS Express.  This way even images and other types of resources can be
                            localized.  Even Windows Forms can be localized by another company using
                            "WinRes.exe ".
                            >
                            While resx files are good it can be hard to manage localization of
                            large projects with many resx files and ensure consistency of
                            translation between different forms and controls. If you use
                            external translators then you must also manage the change process ie
                            if you make changes to resources they have already translated how do
                            you track these and ensure that the changes are translated.

                            Using the out of the box localization tools you typically follow these
                            steps: Send the translator the resources to translate. They translate
                            resources and send them back. You build the application and send it
                            to the translator for verification. They find issues and you go
                            through the whole loop again. This process can be quite time
                            consuming because there is no way for the translator to see or run the
                            translated forms and controls. For simple forms you can use WinRes
                            to view and edit form resources. It does not, however, cope well
                            with complex forms containing custom controls. You could give your
                            code to the translator and get them to use Visual Studio Express to do
                            the editing - but do you really want a translator mucking with your
                            code?

                            For the above reasons you should consider using a third party tool to
                            manage the localization process. There are a number of localization
                            tools on the market including Globalizer.NET (www.infralution.com/
                            globalizer.html ) which my company Infralution sells. Typically these
                            tools scan your solution/projects for localizable resources and
                            consolidate these into a single package that you can send to the
                            translator. When the translator completes translations they send
                            them back to you and the tool provides a mechanism to import the
                            translations and build the localized resource files. You can then
                            build your application using the standard Visual Studio build
                            process.

                            Globalizer.NET in addition to providing these standard localization
                            management tools provides a free Translator Edition that enables the
                            translator to preview the actual translated forms and controls as they
                            translate. The Translator Edition can even build the localized
                            binary resource assemblies (without requiring your code or Visual
                            Studio to be installed) which allows the translator to run the fully
                            localized application without having to go around the build-translate-
                            build loop.

                            Regards
                            Grant Frisken
                            Infralution


                            Comment

                            • Herfried K. Wagner [MVP]

                              #15
                              Re: How to build the multi-language application?

                              "Grant Frisken" <grant@infralut ion.comschrieb:
                              >You can send the ResX files to a localization agent who canlocalizethem
                              >using VS Express. This way even images and other types of resources can
                              >be
                              >localized. Even Windows Forms can be localized by another company using
                              >"WinRes.exe" .
                              >
                              >While resx files are good it can be hard to manage localization of
                              >large projects with many resx files and ensure consistency of
                              >translation between different forms and controls. If you use
                              >external translators then you must also manage the change process ie
                              >if you make changes to resources they have already translated how do
                              >you track these and ensure that the changes are translated.
                              I agree, and I believe that VS alone is not the right tool for this purpose!
                              In addition, modern software engineering methods make the process even more
                              complicated because of the high number of released versions.

                              --
                              M S Herfried K. Wagner
                              M V P <URL:http://dotnet.mvps.org/>
                              V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                              Comment

                              Working...