Skip to content

Commit

Permalink
Update chapters/packages.tex
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Oct 11, 2022
1 parent cf9439e commit 735415e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chapters/packages.tex
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,15 @@ \section{Multilingual Descriptions}\label{multilingual-descriptions}
Only literal strings and concatenations of literals strings are translated.
In order to have parameter values as part of the texts the special substitution syntax is preferable (see \cref{text} and \cref{variable-replacements}), and translators need to be aware of these substrings in order to make good translations.

\begin{example}
Consider:
\begin{lstlisting}[language=modelica]
annotation(…, Text(string = "1st Frequency is %f1."),
Text(string = "2nd Frequency "+"is "+String(f2)+".")…);
\end{lstlisting}
In this example only the string \lstinline!"1st Frequency is %f1."! can be translated, and no strings from the second line.
\end{example}

The files to support translation must be provided along with the library.
They must be stored in the resources directory \filename{modelica://$\mathit{LibraryName}$/Resources/Language/}.

Expand Down

0 comments on commit 735415e

Please sign in to comment.