5 Replies Latest reply on Jul 30, 2004 4:01 AM by kamikatze

    Translation to other languages & Templates

      Hello,

      I have done a lot of translation work into German and general localization work in some modules. Now I have question regarding templates:

      While localizing the download module, there are at last two menu entries "Main Download Area" and "Popular" which can be found/are defined in downloads.tpl. Can I access the Resource file (Resource_de.properties) where all localized attributes are found?

      Second, how does the ${downloads.MYVARIABLE} mechanism work? In the permissions module, there are no localizations and I like to access th localized variables.

      Regards,

      Cyrill

        • 1. Re: Translation to other languages & Templates

          Solution for Download module:

          DownloadModule.java
          ---------------------------------

          add the following statements:

          menuContext.put("POPULAR", "Popular");
          menuContext.put("MAIN_DOWNLOAD_AREA","${downloads.MAIN_DOWNLOAD_AREA}");
          



          downloads.tpl
          ----------------------------------

          Wrapp keywords from Resource_de.properties into parantheses {EXAMPLE}
          <br/>[ <a href="index.html?module=downloads&op=main&authid={AUTHID}">{MAIN_DOWNLOAD_AREA}</a> | <!-- BEGIN addDownload -->
          <a href="index.html?module=downloads&op=displayAddDownload&authid={AUTHID}">{TEXT_ADD_DOWNLOAD}</a> | <!-- END addDownload -->
          <a href="index.html?module=downloads&op=displayNewDownloads&authid={AUTHID}">{TEXT_NEW}</a> |
          <a href="index.html?module=downloads&op=displayPopularDownloads&authid={AUTHID}">{POPULAR}</a> |
          <a href="index.html?module=downloads&op=displayTopRatedDownloads&authid={AUTHID}">{TEXT_TOP_RATED}</a> ]


          Unfortunately, there are also content in the database which can not be localized "My Download Area" which is included in a EJB.

          • 2. Re: Translation to other languages & Templates

            Answer for the second question:

            You simply have to choose the module name ${modulename.KEY} and you are done. Module name means the name of the module in the code base.

            bb --> Forum Module
            permission --> Permission Module

            • 3. Re: Translation to other languages & Templates

              Hi Cyrill!

              I'm interested in the german localisation. How can I get it?
              And how is it achieved? Just to create de_de property-files doesn't seem to do the job (haven't tried hard, I admit).

              On top of that, I would like to have the possibility to change the localization on the fly, not just by the request.getLocale() stuff, because I would like to be able to have a Language Selector on the page. Is that done already? If not I can put some effort in coding that.

              Cheers, Mika

              • 4. Re: Translation to other languages & Templates

                Mika,

                Please send me an Email (German) to cr at innovate-it dot ch
                I will then send you informations how to get the german localized nukes version. It is not finished for 100%, it can contains translation errors. In the block module, some localization is not possible due the way it is coded.

                You simply have to put in properties files, translate them and localize tons of not localized variables. It took me about 4-5 days to localize it to german. Based on this work, translating to other languages whould be very easy, just translate the properties files.

                The language is choosen from the informations in the HTTP-Header e.g from the browser language.


                Regards,

                Cyrill

                • 5. Re: Translation to other languages & Templates

                  Email sent.

                  Could you describe (from an eagle's perspective) what had to be done (here for the community)?
                  And had you to change code that would need to be checked in? It is important for most of us to be compatible with the head branch.

                  Cheers, Mika