Use the API to internalionalize your glossary

This article is for developers with a full understanding of how to work with our API. 

Important note about the API explorer
When you follow the link we provide to the API explorer, you'll see a red warning.
API_image01.png
The API itself is not deprecated. It's the Google API explorer that is deprecated. All the processes described in our API articles function correctly and safely if you use this Google API explorer. 

The glossary is a list of all the user-defined labels in a given library, such as document classes, property names, category names and values, workflow states, views, relations and roles.

Note: The glossary doesn't contain the names of the library, documents or folders. These are never translated.

As a library administrator, you can use the API to translate the glossary terms of your library into as many languages as you want from the list of available languages. When users change the language of AODocs, any translated glossary terms are displayed in the selected language.

In this article:

Automatically generated table of contents


Extract the existing glossary

1. As a library administrator, follow one of these links to the AODocs API:

  • US instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://ao-docs.appspot.com/_ah/api#s/library/v1beta1/library.glossary.get

  • EU instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://aodocs-core-eu-1.ey.r.appspot.com/api#s/library/v1beta1/library.glossary.get

Note: Dedicated instances have their own URLs. Learn more: What are AODocs instances?

2. Enter the ID of the library in which you want to internationalize the glossary. Learn how to identify library IDs.

3. Click Authorize and execute. The response is displayed in the lower part of the screen.

image01.png

4. Copy the entire response. 

Note: In the example below, the glossary terms already have French and Spanish translations, except the term "All documents", which is the name of a view.

image02.png


Set the internationalized glossary

1. As a library administrator, follow one of these links to the AODocs API:

  • US instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://ao-docs.appspot.com/_ah/api#s/library/v1beta1/library.glossary.set

  • EU instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://aodocs-core-eu-1.ey.r.appspot.com/api#s/library/v1beta1/library.glossary.set

Note: Dedicated instances have their own URLs. Learn more: What are AODocs instances?

2. Enter the ID of the library for which you extracted the glossary. Learn how to identify library IDs.

3. Click in the Patch body field, then click the arrow in the top right corner and select Freeform editor.

4. Paste the text you copied after extracting the glossary into the Patch body field.

Important: Make sure you paste the entire extract. If you paste only the glossary terms you want to translate, all existing internationalizations will be overwritten when you set the glossary

image03.png

5. Click the arrow in the top right corner of the Patch body field and select Structured editor.

6. For each glossary term you want to translate, add a new label. 

image04.png

7. Then add as many translations as required.

image05.png

8. Click Authorize and execute. The response is displayed in the lower part of the screen.


What do end users see?

Users can select the language of AODocs. If there are glossary terms translated into the selected language, these translations are displayed in the AODocs interface. 

In the example below, the glossary term "All documents" we translated into French and Spanish is displayed in Spanish when the AODocs interface is displayed in Spanish.

image06.png

If there is no translation for a given glossary term, the original wording defined in the interface is used. In the example below, the AODocs interface is displayed in Portuguese but there is no Portuguese translation for "All documents" in the glossary. 

image07.png

The wording "All documents" is used because this is the original wording used in the administration interface to name this view.

image06.png

Was this article helpful? 0 out of 0 found this helpful
If you didn’t find what you were looking for, don’t hesitate to leave a comment!
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.