unimarkup / specification

Contains the specification of the Unimarkup language
Other
3 stars 0 forks source link

[REQ] Adapt language configuration options #34

Open mhatzl opened 1 year ago

mhatzl commented 1 year ago

At the moment there are two options to specify languages used in a document:

  1. lang ... The default language of the document
  2. multi-langs ... List of other languages the document should be translated to (e.g. used to create columns in .umi files)

While the lang option is clear, multi-langs is not so, because there is a difference between possible other languages used in a document, and other languages the document should be rendered in. Therefore, this option should be divided into two options:

Note: render-langs contains natural languages, while formats defines output formats the document is rendered to.

The render-langs option must also not be allowed in the preamble, because this option makes no sense for inserted files. The options lang and `used-langs´ should be allowed in the preamble, because they are related to the file content.

mhatzl commented 1 year ago

Maybe translate-to would be a better name instead of render-langs. render could be misleading, because rendering is used to describe the process of transforming Unimarkup content into an output format.

mhatzl commented 1 year ago

Alternative option names:

mhatzl commented 1 year ago

As mentioned in issue unimarkup/unimarkup-rs#102, all locales will be supported by default. This makes used-langs, locale-file and download obsolete.

For clarity, langs should be renamed to output-langs with the behaviour described above. The locale of lang must always be implicitly added to this list if not present.