It's all about the answers!

Ask a question

How do I specify a language to install during command-line installation


Thomas Ehrnhoefer (545) | asked Aug 15 '14, 1:57 p.m.
I want switch a command line installation to install a server in a different language. And while I found references in the help docs when using the UI ("To install additional languages, select one or more languages, and click Next."), I fail to find anything in the command line client documentation.

I tried the repoTools -help, too, but no luck. I also looked at various input files during installation and configuration, same difference.

Basically what I want is that OSLC API calls are returning a localized, non-english version (unless a language header is present).

Any pointers would be great.

Thanks!
Thomas

Comments
Chris Daly commented Aug 18 '14, 11:33 a.m.
JAZZ DEVELOPER

Are you using an Installation Manager response file for the command-line install?  In the example that Michael gave, the userinstc command is passed our default server response file called silent-install-server.xml.  IM response files can have a property that lists the set of languages to be installed:

        <!-- include all NL files -->
        <data key='cic.selector.nl' value='en,fr,it,zh,ru,zh_TW,zh_HK,de,ja,pl,es,cs,hu,ko,pt_BR'/>

This property is already present in the silent-install-server.xml response file, and the list of 15 languages here is the full list we currently support.

Note also, that the languages are installed in groups.  If you select just one language from a group, the whole group of languages get installed (currently we have 2 language groups), so you may get more languages installed than were selected.


Thomas Ehrnhoefer commented Aug 18 '14, 2:17 p.m.

I am using silent-installer2.xml (for cases where no InstallManager is installed), and that XML file does not actually list the languages. Can I adapt that one with a profile element (and set that profile on the offerings)? Or, can I check which languages are installed somehow?

I realized (see my answer below to Donald) that even with a proper language header in my OSLC request, I am getting english back, so something must be wrong with my installation somehow.

2 answers



permanent link
Michael Afshar (7014) | answered Aug 15 '14, 2:23 p.m.
JAZZ DEVELOPER
 Hi Thomas,

Have you tried the -nl switch with 2 or 4 character language code? For example, .\userinstc -acceptLicense -dataLocation C:\tmp\silent-install\data -silent -showVerboseProgress -nosplash -input silent-install-server.xml -nl es



Comments
Thomas Ehrnhoefer commented Aug 16 '14, 4:39 a.m.

Thanks. I have tried that (together with ensuring the proper locales are installed and used in my linux environment). But no change. While the configuration command line interface is now all in german, the application itself and API responses are still english.


permanent link
Donald Nong (14.5k614) | answered Aug 17 '14, 11:26 p.m.
edited Aug 17 '14, 11:26 p.m.
I'm quite curious about your comment "unless a language header is present". Isn't it how we do it? Using the "Accept-Language" request header along with the OSLC API calls will tell the application to return content in the specified language, if the localized content exists. Below is the response with a request header "Accept-Language: de-DE"
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:jfs="http://jazz.net/xmlns/prod/jazz/jfs/1.0/"
         xmlns:dcterms="http://purl.org/dc/terms/"
         xmlns:oslc="http://open-services.net/ns/core#">
    <oslc:Publisher  rdf:about="https://clm406:9443/qm/application-about">
        <dcterms:title>Quality Management</dcterms:title>
        <dcterms:description>Stellt Funktionen für das Testmanagement bereit, z. B. für die Testplanung, die Erstellung und Ausführung von Tests sowie für Workflowsteuerung, Überwachung und eine durchgängige Verfolgbarkeit.</dcterms:description>
        <dcterms:identifier>http://jazz.net/application/qm</dcterms:identifier>
        <jfs:version>4.0.6</jfs:version>
        <oslc:icon rdf:resource="https://clm406:9443/qm/web/com.ibm.rqm.planning.web/ui/internal/page/templates/images/banner/RQM_16.png"/>
        <jfs:instanceName>/qm</jfs:instanceName>
    </oslc:Publisher >
</rdf:RDF>



Comments
Thomas Ehrnhoefer commented Aug 18 '14, 4:34 a.m.

Thanks Donald, good point, I didn't explain well.
What I am trying to set up is a test instance that provides a non-english version of the API responses, so I can continue to assure that our integration with the server functions as expected (i.e. adds the language header properly).

We did manage to set up a Windows-based server in German and API responses without a language header came back in german (like you posted above).


Donald Nong commented Aug 18 '14, 6:31 a.m. | edited Aug 18 '14, 6:36 a.m.

Without a language header, you really rely on how the application behaves according to the locale. I just did a quick test - after I set "LANG" and "LC_ALL" to "de_DE" and started Jazz server, the same OSLC API calls returned contents in German. I used cURL to make sure no "hidden" headers would be sent.

curl -k https://clm:9443/jts/application-about
To make sure the right locale parameters are passed to the startup script, you can add these two lines in the server.startup script.
export LANG=de_DE.UTF-8
export LC_ALL=de_DE.UTF-8



Thomas Ehrnhoefer commented Aug 18 '14, 2:18 p.m.

I have tried that already, no luck.
But it made me try requesting the OSLC response with an accept-language header de_DE, which resulted in english, too.
I assume right now that the way I am installing (using silent-installer2.xml, which doesn't contain the languages property) maybe only installs english?


Donald Nong commented Aug 18 '14, 9:43 p.m.

Be careful with the language code - in a request header, you would use a dash(-) instead of an underscore(_).
If you still get response in English, you may have installed the application without any language packs as you mentioned. I take that you used the file "silent-install-server2.xml" for silent installation? If so, use "silent-install-server.xml" instead. It has plenty of options for you to customize the installation, just read the comments carefully before modifying the file.
The line of interest in that file is

        <data key='cic.selector.nl' value='en,fr,it,zh,ru,zh_TW,zh_HK,de,ja,pl,es,cs,hu,ko,pt_BR'/>
You can remove all other languages and leave "en,de" only.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.