3. Translating Documents
It is not uncommon for a document to be published in different languages. adoc Studio assists you in the Pro version with translation support.
3.1. Preparation
First, you need to specify the target languages required for the project. To open the menu (⌘+;) or select in the context menu of any item in the project navigator and select . This opens a dialog where you can add all target languages using the button at the bottom left.
3.2. Usage
To assign a language to a file, select in the context menu. This changes the representation in the file tree of the project navigator. Expand the arrow to see the assigned language. With , you can assign additional languages. In the context menu, only the languages defined in the project and not yet assigned to the file are offered.
In addition to the project navigator, the languages are also directly accessible in the toolbar.
-
In the first elements, you navigate through the project and folder structure (here Manual & Publish).
-
Next is the file you are working on in the editor (here products).
-
Then comes the language (here Englisch).
-
Finally, the section with the position of the cursor (here Products).
3.3. Technical Background
When you assign languages to a file, the file content is transferred into the first language. We recommend choosing the language in which your document is written as the first language. When you assign additional languages to a file, the content is not copied.
All translated files will be displayed in the
Finder with an extended naming convention. Each file receives a country code before the file extension. Thus, Manual.adoc becomes Manual.de.adoc for the German version and Manual.en.adoc for the English version. In adoc Studio, these language versions are always represented as part of the file tree.
The languages refer not only to .adoc files but also to all contents of a project. This way, you can use different media for each language.
If a file is not translated, it will be used in all languages.
The abbreviations used correspond to common country codes (Locale Codes). Specific regions are appended with a hyphen, such as en-HK for Hong Kong English. The language codes are displayed in the list of all document languages. |
3.4. Output
The exports always affect the currently displayed language. Thus, there is no language selection here.
On the other hand, the products come with a language selection, as they always act globally and can even be activated via the command line in scripts or in the Shortcuts.app.