Is there a solution to generate diagrams for several languages with the same description file

0 votes
asked Aug 6 in Wanted features by anonymous


Is there a solution to generate diagrams for several languages (one PNG per language) with the same and unique description file ?

Could it be possible to manage language properties file (such as or in the same directory as the description file) and use the keys within the description file when generating PNG files (one per detected language).

Sample description file :

Alice -> Bob: @authentication.request
Bob --> Alice: @authentication.response

Alice -> Bob: @another.authentication.request
Alice <-- Bob: @another.authentication.response

Sample file :

authentication.request = Authentication Request
authentication.response = Authentication Response
another.authentication.request = Another authentication Request
another.authentication.request = Another authentication Response

The generated PNG file could have the en_us suffix at the end.

There is probably a better solution to do it without duplicating the description file 

There may be a better way to do it without duplicating the description file but it would need some reflection before implementing it.

Thanks a lot.

1 Answer

0 votes
answered Aug 6 by Serge Wenger Work (9,810 points)


You can do like this minimal sample:

' if you comment next line, it will be french
!define English

!ifdef English
' you can do the same for include
!define Def_txt1 English
!define Def_txt1 Fran├žais
Bob -> Alice : Def_txt1

commented Aug 6 by Serge Wenger Work (9,810 points)
You can set define on command line with -D<YourDefine>
commented Aug 7 by anonymous
Thanks Serge it is a good starting point