Multilungual Nimdoc

2023-01-23 Thread termer
@ringabout I guess I could do that, but it would mean that I'd have to maintain a separate file and make sure the proc signatures are always in sync. I did experiment with using a `when` block for docs but the indent doesn't work out with it. I'd likely have to use a macro. I'll see if that work

Multilungual Nimdoc

2023-01-16 Thread ringabout
That's hard to maintain, though. Perhaps you can maintain the Chinese documentation in the separate directory =>

Multilungual Nimdoc

2023-01-16 Thread termer
It looks like my best bet would be to do as @Hlaaftana and @PMunch suggested and add a `when` statement, or create a macro. @federico3 I'm surprised Araq was against translation in the RFC linked. I know for a fact that I can maintain documentation in 2 languages for my own project, so it shoul

Multilungual Nimdoc

2023-01-16 Thread federico3
See and

Multilungual Nimdoc

2023-01-16 Thread PMunch
To extend this you could of course have this done by a small macro so you wouldn't have to type out all the when defines each time. Not entirely sure if it works for doc comments, but you might be able to use the nimterlingua or localize packages as well. If neither works with doc comments you m

Multilungual Nimdoc

2023-01-13 Thread Hlaaftana
I have no idea if this works, but as an idea maybe you could do: proc foo*() = when defined(englishDocs): ## English docs here when defined(chineseDocs): ## Chinese docs here Run then build docs with `nim doc -d:englishDocs foo.nim` for Engli

Multilungual Nimdoc

2023-01-13 Thread termer
Hi, I'm currently writing a library, and I'd like to translate its documentation into Chinese. Is there a structured method for writing documentation in multiple languages, or do I just need to write it in multiple languages within the same Nimdoc comments? Alternatively, I suppose I could crea