Skip to main content
Skip table of contents

Change the Supported User Interface Languages

The list of supported languages for SuperWEB2 is defined in <tomcat_home>\webapps\webapi\WEB-INF\faces-config.xml.

To change the default and supported languages, edit the following section:

XML
<locale-config>
    <default-locale>en</default-locale>
    <supported-locale>zh</supported-locale>
    <supported-locale>de</supported-locale>         
    <supported-locale>ar</supported-locale>         
    <supported-locale>ru</supported-locale>
    <supported-locale>ja</supported-locale>
    <supported-locale>en</supported-locale>
</locale-config>

If you make any changes to the settings in faces-config.xml, you must restart Tomcat or the SuperWEB2 service to apply the changes.

Change the Default Language

The default language is used if the user's browser does not send a list of supported languages, or none of the user's preferred languages are supported.

To change the default language to something other than English, change the value of <default-locale>. For example, to set the default to German (de):

XML
<locale-config>
    <default-locale>de</default-locale>
    <supported-locale>zh</supported-locale>
    <supported-locale>de</supported-locale>         
    <supported-locale>ar</supported-locale>         
    <supported-locale>ru</supported-locale>
    <supported-locale>ja</supported-locale>
    <supported-locale>en</supported-locale>
</locale-config>

When setting the default, you are recommended to also add any country-specific variants of that language to the list of <supported-locale> settings. For example, if you set the default to de, then you should add variants such as de_AT and de_CH to the list of supported locales. In most web browsers, if the user has set their browser language to a country-specific locale (such as de_AT), then the browser will automatically add the locale of the corresponding main language to its list (de in this example). However, some browsers (including older versions of Internet Explorer) do not do this, and this can mean that users see the wrong language by default when they start SuperWEB2. Adding all the variants of your preferred default to the <supported-locale> list in SuperWEB2 will workaround this issue.

Configure SuperWEB2 to Use a Single Language Only

If you want to disable multilingual access and ensure that SuperWEB2 always displays in a specific language, simply remove all the <supported-locale> settings except the single language you want to support, and change the value of the <default-locale>.

For example, to configure SuperWEB2 to display in Arabic:

XML
<locale-config>
    <default-locale>ar</default-locale>
    <supported-locale>ar</supported-locale> 
</locale-config>

Add a New Supported Language

If you have created a resource bundle for an additional language, then you need to add this to the list in faces-config.xml to make it available to end users.

For example, if you have created a resource bundle for French (fr), add this to the <supported-locale> list as follows:

XML
<locale-config>
    <default-locale>de</default-locale>
    <supported-locale>fr</supported-locale>
    <supported-locale>zh</supported-locale>
    <supported-locale>de</supported-locale>         
    <supported-locale>ar</supported-locale>         
    <supported-locale>ru</supported-locale>
    <supported-locale>ja</supported-locale>
    <supported-locale>en</supported-locale>
</locale-config>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.