...
Meridix has support for a placeholder syntax
...
where commonly used words or sentences can be reused throughout the resource files. This makes is easy to replace the naming for specific actions/features in the system. The placeholder functionality is used by the default translations files to allow a easier editing of the translations since you only need to define a word or phrase once.
All the placeholder values is located in a file called Placeholders.{.culture}.resx where the systems tries to find a specific translations for the current language first and if not found it will fallback to the base placeholder value located in the base file (Placeholders.resx).
The syntax used for placeholders is {=key[:option]}. The simplest usage of a placeholder value is {=key } where no options is defined. This value will be replaced with the translated value for the key value from the placeholder file. To allow maximum reuse of a placeholder value several options can be defined that decides how the placeholder value should be displayed. A option value is a suffix to the key starting with a : (colon) followed by the option key (Se list below for available option keys and their usage)
Multiple option suffixes can be combined and the will be evaluated in the order they appear. E.g. key:lowercase:capitalizefirst:uppercase will make all characters in upper case since the last option (uppercase) will change the previous option results.
Option key | Description | Example of usage |
---|---|---|
:lowercase | Convert all characters to lowercase before being used | {=Username:lowercase } |
:uppercase | Convert all characters uppercase before being used | {=Username:uppercase } |
:capitalizefirst | Convert the first character uppercase before being used. This does not convert the other characters lowercase. Combine with :lowercase to make only the first character in uppercase. | {=Username:capitalizefirst} {=Username:lowercase:capitalizefirst} |
:htmlencode | Encodes the values to a valid HTML representation, replacing any characters that would otherwise be interpreted as HTML tags. | {=Username:htmlencode } |
:urlencode | Encodes the values to a valid URL representation that can be used a in query strings etc. | {=Username:urlencode } |
:htmlnbsp | Converts all spaces to to prevent unwanted line breaks in HTML based user interfaces. Is only used when a web based UI is calling the placeholder feature. | {=Username:htmlnbsp } |
Placeholders can also be overriden just as any other resource. To override a resource define a package of the type package_translation_overrides (see next section) and the resource path should be defined as placeholders
Custom translation overrides
There are a hook that allows a customer to override translations for a specific languages without altering the binary build. This feature is meant to allow a customer to enable a specific terminology to increase the user terminology recognition from other systems.
Custom text files can be created and uploaded as packages in Meridix containing lines in the format defined below, each of these files (packages) is then loaded and used as overrides to the build in (compiled) translations.
...
The file should be uploaded to the system as a package of the type package_translation_overrides
Info |
---|
This feature is only used when customers have specific requirements and are not a recommended solution for translation of resources if not necessary. |
Report content (ex: column headers) are currently not overridable. This may change in upcoming releases.Placeholder values can be overridden by specifying the resourcepath as placeholders