3 Replies Latest reply: Jul 29, 2005 6:45 PM by 178710 RSS

    brandingFromResource element in OHW & package name problems

    328709
      Greetings,

      We are using OHW 2.0.2 and plan to localize our product in several languages. This means we will be using the <brandlingFromResource> xml element in order to localize the product branding text. However, we've identified a problem with the package names and signing jars that I'm not sure how to work around.

      The branding resource element specifies a class name, e.g.

      <brandingFromResource resource="com.hp.test.MyBundle" textKey="title" />

      Then the com.hp.test.MyBundle class is in one jar, while its localized version, e.g. com.hp.test.MyBundle_ja is in separate jars (one for each locale...) All these jars are signed.

      The problem is that we are not releasing our product and localized versions at the same time. The jar containing com.hp.test.MyBundle may be signed by a different certificate than the jar containing com.hp.test.MyBundle_ja. Then things won't work as java does not allow package to have classes that reside in two differently signed jars.

      I'm not sure how to solve this problem. Is there anyway to add a default string to the <brandingFromResource> element? At least we wouldn't need the default class and we could ensure that all the localized versions are signed by the same certificate.

      thanks,

      Elizabeth Dyer.
        • 1. Re: brandingFromResource element in OHW & package name problems
          178710
          Hi Elizabeth,

          I would highly recommend using a later OHW release (such as OHW 2.0.8). We have fixed a lot of bugs since OHW 2.0.2. See the OHW 2.0.8 release notes on OTN for a list of fixed bugs.

          Luckily, OHW does allow a mix of static and dynamic bindings. In your config file you can have something like this:

          <brandings>
          <branding text="My Product" locales="en" />
          <brandingFromResource resource="com.hp.test.MyBundle" textKey="title" locales="de ja ....." />
          </brandings>
          • 2. Re: brandingFromResource element in OHW & package name problems
            328709
            Thanks for the tip. I upgraded to OHW 2.0.8 and added...

            <brandings>
            <brandingFromResource resource="com.hp.ov.test.MyBundle"
            textKey="1" locales="ja ko zh_CN" />
            <branding text="HP Help" locales="en" />
            </brandings>

            to my ohwconfig.xml (we have translations for Japanese, Korean and Simplified Chinese...) I first realized I had to put the branding element below the brandingFromResource, or else it would always default to text specified in the branding element.

            I then tried setting various locales in my browser and found that this worked for the most part, but there were still some problems. If I set my browser language to a locale that OHW is not localized in such as Finnish, then OHW displayed the "HP Help" branding text correctly. However, if I set my browser language to a locale that OHW is localized in (such as Spanish) but isn't in my list of locales in the brandingFromResource element, then the OHW branding text is "Oracle Help for the Web 2.0".

            A couple questions:

            Is it possible to set up the branding element to have a default, rather than list all locale for that text? It seems like the "en" almost works, except for the case of Spanish (and other locales that OHW has been localized in...)

            Do I have to specify the list of locales that I do have a ResourceBundle for? Our product will add localizations over time, and it would be a pain to always have to update ohwconfig.xml to list all the locales that are available.

            thanks,

            Elizabeth Dyer.
            • 3. Re: brandingFromResource element in OHW & package name problems
              178710
              Hi Elizabeth,

              Out of curiousity, what happens when you leave the locale off the static branding, but put it second:

              brandings>
              <brandingFromResource resource="com.hp.ov.test.MyBundle"textKey="1" locales="ja ko zh_CN" />
              <branding text="HP Help" />
              </brandings>

              I'm also double checking with the developer for this feature to see how this is intended to work...