Localization
How does Nytril handle localization, measurement units, and regional
paper sizes? How does the integrated translation service work?
The most powerful Nytril documents are created in a way that supports text reuse and
localization. In a localized project, user-facing language strings are stored together in a
separate file. These are simply source files, but all the strings are given variable names in a
Lang
namespace. For example, instead of embedding the text —
"License Agreement"
—
in your document, you would use a symbol such as
Lang.LicenseAgreement
.
A built-in feature of Nytril lets you easily gather up quoted strings from your project source
files and make this language file for you. Another built-in feature will translate those strings to
another language.
1)
Choose 'Translate Language Strings' from the menu.
2)
Choose the languages to translate into
3)
Click 'Translate'
4)
Review and edit the newly translated strings in source code
In the end, the project will have one source file for each supported language. Next, writers
define Configuration objects in source code, to control which versions of each document they
want to publish.
A simple example is a project with two configurations:
1)
English, Imperial units, Letter paper
2)
German, Metric units, A4 paper
Once defined, Nytril will automatically publish two different versions of each document. The
correct version is shown to the customer based on their site preferences.
Nytril has full support for units and conversions between them. Most shops will want a
customized way of dealing with the display of numbers with units, and this can all be easily
handled with no limitations. In particular, the
Sparling
example above has custom routines for
converting fractional inches to metric, in ways that handle industry specific edge cases. The
important thing is that this code is written once, it is under your control, and can be used on
all the project content, including external data.