How do I specify a language to install during command-line installation
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 |
2 answers
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.
|
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#" Comments
Thomas Ehrnhoefer
commented Aug 18 '14, 4:34 a.m.
Thanks Donald, good point, I didn't explain well.
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-aboutTo 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
Thomas Ehrnhoefer
commented Aug 18 '14, 2:18 p.m.
I have tried that already, no luck.
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(_).
<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
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.
Comments
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.
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.