Internationalization
To localize the menu, reports and format, specific files with language codes must be used.
{language} - 5 digits (e.g. en_US, de_DE)
Using a Foreign-Language Menu
If you want to use a foreign-language menu, the following files must be available:
menu-translation.{language}
resources _ {language}.properties
In this case, the operator who is logging in must have the same language code {language}.
Using a Foreign-Language Report
If you want to use a foreign-language report, the following file must be available:
resources-reports_{language}.properties
In this case, the operator who is logging in must have the same language code {language}.
The used language of a report is configurable:
The language code of the business unit is used (by default): report-descriptor.xml
<report id = "SALES_PER_SALES_PERSON" type = "sales_per_employee" resourceTranslate = "STORE">
The language code of the operator is used: report-descriptor.xml
<report id = "SALES_PER_SALES_PERSON" type = "sales_per_employee" resourceTranslate = "USER">
The address model to be used to display the store address is configurable:
calculation-service.properties
gkr.calculation-service.reportHeaderCalculation.addressModel.us.localesList={language} (default:en_US)
Fallback Language Support
POS Server vaadin-UI translations (resources.properties) and texts for reports (resources-reports.properties) support fallback languages.
If a particular resource is not found in the resource files of a locale, the resource for the fallback locale is used instead.
Multiple levels of this fallback are supported.
Each locale has an "implicit fallback", i.e. the implicit fallback of de_DE is "de".
Failover languages are configured in the failover-languages.properties:
swee.common.i18n.fallbackLanguage.de=ru_RU
swee.common.i18n.fallbackLanguage.ru=en
This means that when the de_DE resource is requested, this chain of file suffixes is scanned and resources are used:
_de_DE <- _de <- _ru_RU <- _ru <- _en
The same behavior will also apply to resource files for reports, so that language-specific report templates or pictures will follow this chain as well.
In the default product configuration, all languages fallback to en_US.
Entry Dialog for Dates
When using the date formats yyyy-MM-dd and dd-MM-yyyy for entry dialogs, the - sign should appear as '-' in the configuration. Otherwise, this sign would be interpreted as a mathematical minus sign.
Example:
editMask="yyyy'-'MM'-'ddT00:00:00"
editMask="dd'-'MM'-'yyyy"
Using Country-Specific Formats
Country-specific formats (e.g. for date, time and amount) can be configured in a separate file. The resource file with operators language code will be loaded when logging in.
Menu:
Location: …/pos-server/config/parameter/translation/
File name pattern: resources-internals_{language_code}.properties
Reports:
Location: …/pos-server/config/parameter/reports/
File name pattern: resources-reports-internals_{language_code}.properties
The used language of a report is configurable (see Using a Foreign-Language Report).
12-Hour Format AM/PM
resources-internals_{language}.properties
To activate the 12-hour format AM/PM in a time field, attach "n" to the time format for an edit field and "a" for a display field.
com.gk_software.gkr.pos_server.web.accounting.functions.day_end_closing.db.PeriodsDataRow.DATE_FROM__EDIT_MASK=MM/dd/yyyy h\:mm n
com.gk_software.gkr.pos_server.web.accounting.functions.day_end_closing.db.PeriodsDataRow.DATE_TO__DISPLAY_MASK=MM/dd/yyyy h\:mm a