Login  Register

Re: support for i18n (lang var) in asciidoctor*

Posted by mojavelinux on Feb 20, 2021; 12:53pm
URL: https://discuss.asciidoctor.org/support-for-i18n-lang-var-in-asciidoctor-tp8521p8524.html

> I would espect that language definitions for labels were included in the asciidoctor* packages. Apparently that is not so actually.

Yes, they are there. You can find them in the data folder.

ls $(dirname $(dirname $(gem which asciidoctor)))/data/locale

If you read the document I linked to fully, you would see that there is a link to this folder in the GitHub repository if you want to download them. There's also a link to an issue about making this behavior automatic. See https://github.com/asciidoctor/asciidoctor/issues/1129

The file is not loaded automatically when you set the lang attribute because it has always been left up to the reader to decide how to handle. The docs explain how to do that. If you can propose a way to do automatically that is backwards compatible, I'm listening. Though it's not something I have time to work on right now.

Best Regards,

-Dan

On Sat, Feb 20, 2021 at 3:21 AM ciampix [via Asciidoctor :: Discussion] <[hidden email]> wrote:
On Sat, Feb 20, 2021 at 03:06:25AM -0700, mojavelinux [via Asciidoctor :: Discussion] wrote:

>
> What you may be looking for is described here:
> https://docs.asciidoctor.org/asciidoctor/latest/localization-support/
>
> That's the extent to which the processor supports localization. The
> processor does not attempt to manage translation of the content itself.
>
> Best Regards,
>
> -Dan
Wow that fast a fast reply! Thanks!

Ok let me reformulate the question.

In order to mimic the same behaviour, since for what I have seen, simply
adding the -a lang=xx does not actually work, that implies that:

1) I would espect that language definitions for labels were included in
   the asciidoctor* packages. Apparently that is not so actually.
   Why not?

2) since 1) it seems that I have to include language definition for labels
   in my build chain. Where I can download language definition for labels
   of all languages (if there are any, I am sure that somewhere there are
   I ever emember to have sent you my native language strings sometime ago)
   or have I to infer those strings from the old asciidoc language
   definitions (lang-xx.conf)?

TIA

--

Saluton,
Marco Ciampa



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/support-for-i18n-lang-var-in-asciidoctor-tp8521p8523.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux