Multilingual DDoc
Brian Schott
briancschott at gmail.com
Tue Mar 4 00:27:02 PST 2014
On Tuesday, 4 March 2014 at 08:21:27 UTC, Uranuz wrote:
> I'm novice in D documentation system. I haven't done any
> comments in DDoc style but want to. My problem is that I want
> to share my library with community but in the same time I need
> to make it understandable for programmers in my team who speak
> Russian but not so good in English. For now I don't want to
> create documentation and then translate it because as I think
> it will take a lot of time. But writing doc comments in 2
> languages would be a good idea for now.
>
> So my question is how it's about multilingual comments in DDoc?
> What I want is to be able to manage what language to use in doc
> generation (may be by compiler switch) or put secondary
> language under spoiler when rendering HTML format docs. Also
> what is about integration with translation services like Google
> Translate?
>
> Also I would be glad to get some info for getting started with
> DDoc.
You can accomplish something similar to this by using DDoc's
existing macro system.
/**
* Some documentation in one language
* $(TRANSLATION Some documentation in another language)
* Macros:
* TRANSLATION=<span class="translation">$0</span>
*/
More information about the Digitalmars-d-learn
mailing list