Forum Stats

  • 3,838,748 Users
  • 2,262,397 Discussions
  • 7,900,749 Comments

Discussions

OHW & multiple locales


I have some questions regarding OHW and how to support multiple locales. Our product is internationalized and also localized in several languages and has helpsets for each of these locales. These helpsets contain the same topics and content for all the locales. For example, when the user running under the French locale selects a help topic, we want OHW to display the French helpset for that help topic. The "Deploying OHW in Apache tomcat" says to put your helpset files under the directory jakarta-tomcat/webapps/ohw/helpsets, and create a ohwconfig.xml file to point to those helpsets. As well, OHW automatically uses the default Java locale and default encoding when using these helpsets. Since our product uses the default Java locale, the ohwconfig.xml file does not need to include a <localeSettings> element.

How do you set up the helpsets directory and the ohwconfig.xml so that OHW selects the correct helpset to go with the Java locale? Is there an individual ohwconfig.xml for each locale, or can I have all the helpsets listed in one ohwconfig.xml file? If there are any examples or guidelines available on how to set this up, that would be great.

thanks,

Elizabeth Dyer.

Comments

  • 158840
    158840 Member Posts: 4
    Sounds like you need to set up separate web applications (servlet) for each language.
    Each web application will have its own version of the OHW servlet and its own ohwconfig.xml file.
    The <locale> element in the ohwconfig.xml will identify the Java locale that the OHW instance
    is running in. The user will be directed to the correct language based on the URL for that web application.

    A web application requesting help could dynamically create the link to the help system using the
    web application locale (if the application has that concept) or the HTTP request locale.

    The next generation of OHW will have a way of loading multiple localized sets of help content into
    one OHW instance.
  • 328709
    328709 Member Posts: 48

    What's the schedule for next release of OHW with the multiple locale support?

    thanks,

    Elizabeth Dyer.
  • 158840
    158840 Member Posts: 4
    It's unknown at the moment, but a safe bet would be Summer 2003.
  • 374599
    374599 Member Posts: 1
    I have another solution to handle your problem:
    instead of using different WARs for every locale you can put all different
    HelpSets in own directories inside one single WAR. You only have to define
    a different mapping of the servlet for every locale you need inside web.xml.

    Here is the code of web.xml (for WebSphere) to show how it works:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app id="WebApp_1">
    <servlet id="Servlet_1">
    <servlet-name>OHW_DE</servlet-name>
    <servlet-class>oracle.help.OHW</servlet-class>
    <init-param id="InitParam_1">
    <param-name>configFileName</param-name>
    <param-value>/helpsets/ohwconfig_de.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet id="Servlet_2">
    <servlet-name>OHW_EN</servlet-name>
    <servlet-class>oracle.help.OHW</servlet-class>
    <init-param id="InitParam_2">
    <param-name>configFileName</param-name>
    <param-value>/helpsets/ohwconfig_en.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping id="ServletMapping_1">
    <servlet-name>OHW_DE</servlet-name>
    <url-pattern>/help_de/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping id="ServletMapping_2">
    <servlet-name>OHW_EN</servlet-name>
    <url-pattern>/help_en/*</url-pattern>
    </servlet-mapping>
    </web-app>

    As you can see above you need to define different ohwconfig_XX.xml-Files
    for every locale.

    Hope this helps a little bit.


    Greetings,
    Thomas
This discussion has been closed.