5 Replies Latest reply on Jan 19, 2004 11:16 AM by koncrete

    Translation / Localization

    sergio1

       

      "sergio@moredata.pt" wrote:
      How can i translate Nukes to other language?


        • 1. Re: Translation / Localization

           

          "cooper" wrote:
          ideally you should replace properties file that contains nukes sentences.

          to be true, modules use these properties files partially. so you have to look at each module, extract the content, put in in locales and at the same time translate in parralel these file in your favorite locale.

          I am in favor of doing that but I don't have the time to do it.


          • 2. Re: Translation / Localization
            sergio1

             

            "sergio@moredata.pt" wrote:
            If the content are in the properties file, the combox where we choose the language will work ?.

            If so, how to add the Portuguese Language ?.

            To extract the content can we use the Netbeans mechanism ?.



            • 3. Re: Translation / Localization

               

              "cooper" wrote:
              no, the current language selection is not mapped to the locale. it is using the HTTP headers to do it.
              I can add it.

              what's the netbeans mechanism ?


              • 4. Re: Translation / Localization
                sergio1

                 

                "sergio@moredata.pt" wrote:
                The one that is available in Tools->Internationalization->Internationalize when you click in the rigth mouse button.
                It extract the strings and generate bundle files.


                • 5. Re: Translation / Localization
                  koncrete

                   

                  "koncrete" wrote:
                  "koncrete" wrote:
                  I started translating nukes by creating the desired property files
                  for a module (e.g. Resource_de_AT.properties), but nukes ignores
                  their existence.

                  The method configure() in class org.jboss.nukes.html.Page determines
                  the correct Locale via request.getLocales() (e.g. de_AT), but The method
                  getResourceBundle() implemented by org.jboss.nukes.core.modules.core.CoreModule
                  returns null.

                  After I fixed it by adding the new locale in CoreModule's constructor
                  to the HashMap holding the locales all works fine:
                   public CoreModule(boolean persistent)
                   {
                   // ...
                   Locale locale = Locale.US;
                   locales.add(locale);
                   bundles.put(locale, new ResourceBundleAggregator(locale));
                   locale = new Locale("de", "AT");
                   locales.add(locale);
                   bundles.put(locale, new ResourceBundleAggregator(locale));
                   // ...
                   }



                  I don't think this is the intended way, but the HashMap holding the
                  bundels as well as the 'addBundle' - method is only accessed from
                  inside the class (CoreModule)?


                  thx

                  martin