Dictionaries¶
Dictionaries support multilingual report generation. They allow you to translate text within your reports into multiple languages, ensuring that your data is accessible and understandable to a broad audience. This page will guide you through accessing, creating, and using dictionaries effectively.
Accessing Dictionaries¶
Dictionaries can be accessed in two ways within CxReports:
-
Dictionaries Page: Navigate to the Dictionaries page from the main menu. Here, you will find a list of all publicly available dictionaries. You can view, edit, or create new dictionaries directly from this page.
-
Report Editor: When editing a report, you can access Dictionaries from the Report tab. This allows you to attach or manage dictionaries specifically for the report you are working on without leaving the editor.
Types of Dictionaries¶
There are two types of dictionaries in CxReports:
- Private Dictionaries: These are tied to specific reports. They are ideal for translations that are unique to a particular report and are not intended to be reused in other reports.
- Public Dictionaries: These are reusable and can be associated with any report. Public dictionaries are useful for common translations that apply across multiple reports, such as standard terms and phrases used throughout your organization.
Using Dictionaries in Reports¶
To utilize a dictionary in a report, you must first attach the dictionary to the report. A single dictionary can be attached to multiple reports, allowing for consistent translations across various documents.
Accessing Translations¶
Once a dictionary is attached to a report, you can access the translations within
your report design by using the path notation $dict.key
. Here, key
represents
the identifier for the specific translation entry in the dictionary.
For example, if you have a translation key named title
, you can access it in
the report with $dict.title
. This method ensures that the correct translation
is displayed based on the report's language settings.
Dictionaries can be assigned an optional name identifier. When a dictionary is named, all its entries are accessed using the notation $dict.{dictName}.key
, where {dictName}
is the identifier you have assigned to the dictionary, and key
is the specific translation entry. This feature is particularly useful when multiple dictionaries are attached to a report, allowing you to specify clearly which dictionary's translation to use, thereby avoiding any confusion.