Skip to content

Commit

Permalink
fortify the localization support page with some keywords and addition…
Browse files Browse the repository at this point in the history
…al context
  • Loading branch information
mojavelinux committed Aug 3, 2021
1 parent 54c3e62 commit cbb79da
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/modules/ROOT/pages/localization-support.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= Localization Support
:keywords: translations, labels, l10n, internationalization, i18n
:url-docbook-i8n: http://www.sagehill.net/docbookxsl/Localizations.html
:url-lang-attributes: {url-org}/asciidoctor/blob/master/data/locale/attributes.adoc

Expand All @@ -7,17 +8,18 @@ Asciidoctor can process the full range of the UTF-8 character set.
That means you can write your document in any language, save the file with UTF-8 encoding, and expect Asciidoctor to convert the text properly.

Furthermore, you can customize the built-in labels (e.g., "`Appendix`") to match the language in which you are writing.
The built-in labels that are used in the output generated by Asciidoctor are English by default.
These labels can be modified by changing the value of the corresponding attributes.
This process is known as localization (l10n).
The built-in labels used in the output generated by Asciidoctor are English by default.
These labels can be modified by changing the value of the <<label-attributes,corresponding attributes>>.

There are some caveats to know about:

* Currently, the official HTML and PDF converters only fully support left-to-right (and top-to-bottom) reading.
Support for right-to-left (RTL) is being worked on.
Support for right-to-left (RTL) is being considered.
See {url-org}/asciidoctor/issues/1601[issue #1601^] for details.
In the interim, you can leverage the DocBook toolchain to get right-to-left support.
* Attributes that store dates and times (e.g., `docdatetime`) are always formatted like `2019-01-04 19:26:06 GMT+0000`.
* Message (aka logging) strings are always in English.
* Attributes that store dates and times (e.g., `docdatetime`) are always formatted like `2019-01-04 19:26:06 -0600`.
* Application messages (i.e., log messages) are always in English.
* Asciidoctor does not support the language conf files used by AsciiDoc.py.
However, Asciidoctor does provide {url-lang-attributes}[a translation file^] that can be used for a similar purpose.
Expand All @@ -38,7 +40,7 @@ If you're not using the DocBook toolchain for publishing, you must translate eac
One way is to set the following attributes in the document header or by passing the attributes via the API or CLI:

.Attributes that control built-in labels
[cols="~,~,30%"]
[#label-attributes,cols="~,~,30%"]
|===
|Attribute |Default English Value |Notes

Expand Down

0 comments on commit cbb79da

Please sign in to comment.