Respected Contributor.
Respected Contributor.
247 views

Import UA language files from command line?

Jump to solution

Hi!

Would like to automate more of the installation and wonder if there's no way to import a language file from command line instead of over the UA web-UI (Application=>Manage Applications(cogwheel)=>Localization(the globe))?

Seems the items are stored in the UA-datbase.
Is is unsafe to update using SQL instead?

Maybe localization is stored in multiple locations?
Or problematic to identify what to localize?

BR
/Thomas

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Respected Contributor.
Respected Contributor.

Re: Import UA language files from command line?

Jump to solution

Hi!

I eventually found it out myself.

It's available over the REST API, and have it working using curl.

BR
/Thomas

View solution in original post

4 Replies
Highlighted
Respected Contributor.
Respected Contributor.

Re: Import UA language files from command line?

Jump to solution

Hi!

I eventually found it out myself.

It's available over the REST API, and have it working using curl.

BR
/Thomas

View solution in original post

Highlighted
Knowledge Partner
Knowledge Partner

Re: Import UA language files from command line?

Jump to solution

Could you post the payload you send, in order to set a language file?  I.e. REST seems simple, till you get to the payloads.  Also what endpoint did the trick?

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: Import UA language files from command line?

Jump to solution

Hi!

Of course!

I call like this:

response=`curl --header "Expect:" --header "Authorization: Bearer ${token}" --header "accept: application/json" --header "accept-charset: UTF-8" -X PUT -H"Content-Type:text/plain; charset=utf-8" --data-binary @sv.properties ${BASE_URL}/IDM/rest/access/ulp/l10n/sv.properties`

sv.properties is a modified copy of what you can download in the UA, or download using a GET using .the same API.

Looks like this:

# English value: Featured Items
category-featured-18-name = Speciella objekt

# English value: Home items
category-home-1-name = Beställ behörigheter

 

BR

/Thomas

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Import UA language files from command line?

Jump to solution

Got it! So trick is to read the payload in as a file from the file system.  Clever.  Thank you for the response, very handy.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.