Localization (LOC)

The loc submodule of sys provides the reference data for places, currencies, and language/locale settings used everywhere else in the ERP — currencies, languages, regions, countries (with EU/embargo and AML markers), country regions, locales, and time zones. It owns no business processes; it seeds the defaults at bootstrap and exposes lookups to other modules.

Concepts

Currency

A monetary unit identified by an ISO-style 3-letter code.

Language

A spoken/written language identified by an ISO-style 3-letter code.

Region

A high-level grouping of countries (e.g. "Europe", "Asia").

Country

A nation-state, attached to a default currency, language, and region. Carries EU-membership, telephone prefix, unit-of-measure system, trade restriction, and the AML risk classification used when assessing counterparties.

Country Region

A subdivision inside a country (state, province, or administrative region).

Locale

A language/country/variant combination used to format dates, numbers, and text for a user (e.g. en-GB).

Time Zone

A named zone identified by a short code and the corresponding IANA ZoneId (e.g. Europe/Amsterdam).

Entities

LOC entities

Currency (Currency)

A monetary unit. Used as the default currency on countries and as the trading currency throughout the ERP.

FieldDescription

code

ISO-style 3-letter business key.

description

Human-readable name.

Language (Language)

A spoken/written language. Used to localize user-facing text and as the default language on countries and locales.

FieldDescription

code

ISO-style 3-letter business key.

description

Human-readable name.

Region (Region)

A high-level group of countries.

FieldDescription

code

Business key (up to 8 characters).

description

Human-readable name.

Country (Country)

A nation-state. Carries the defaults for currency, language, region, and unit-of-measure system, plus the trade and AML markers used when transacting with parties from this country.

FieldDescription

code

Business key (up to 8 characters).

description

Human-readable name.

telephone

Optional international telephone prefix (e.g. +44).

euCountry

Optional EU-membership flag.

currency

Default currency for the country.

language

Default language for the country.

uomSystem

Unit-of-measure system used in the country — see Unit Systems below.

region

Region the country belongs to.

restriction

Trade restriction marker — see Country Restrictions below.

amlRestriction

Anti-money-laundering risk classification — see AML Country Restrictions below.

amlAssessmentDateTime

Optional timestamp of the most recent AML risk assessment.

Country Restrictions (CountryRestriction)

CodeNameMeaning

N

None

No trade restriction.

E

Embargo

The country is under embargo; trading is blocked.

W

Embargo Warning

The country has been flagged for an embargo warning.

Unit Systems (UomSystem)

CodeNameMeaning

M

Metric

Metric system (SI units).

I

Imperial

Imperial system.

U

USA Measure

US customary system.

AML Country Restrictions (AmlCountryRestriction)

CodeNameMeaning

N

None

No AML restriction.

E

Embargo

AML embargo applies.

W

Embargo Warning

AML embargo warning.

U

Unknown

AML status has not been assessed yet.

Country Region (CountryRegion)

A subdivision of a country (state, province, …​).

FieldDescription

code

Business key (up to 8 characters).

description

Human-readable name.

country

Owning country.

Locale (SLocale)

A language/country/variant combination used to format text, numbers, and dates for users.

FieldDescription

code

Business key (up to 12 characters, e.g. en-GB).

language

Language portion of the locale.

country

Country portion of the locale.

variant

Optional locale variant (e.g. POSIX, regional variant).

Time Zone (STimeZone)

A named time zone keyed by a short code and resolved to a ZoneId.

FieldDescription

code

Business key (up to 8 characters, e.g. CEST).

timeZoneId

IANA zone identifier (e.g. Europe/Amsterdam).

Functionality

Bootstrap of default reference data

SYS_LOC_BootstrapApi.bootstrap runs at system bootstrap and idempotently inserts a baseline set of localization records when they are missing: a default currency, language, region, country, locale, and time zone. The values are the constants on SYS_LOC_Constant (see Defaults below) and existing records are never overwritten — the bootstrap only creates what is not already there. Other modules can rely on these defaults being present after startup.

Defaults

ConstantValueUsed for

DEFAULT_CURRENCY_CODE

EUR

Default currency.

DEFAULT_CURRENCY_DESCRIPTION

Euro

DEFAULT_LANGUAGE_CODE

EN

Default language.

DEFAULT_LANGUAGE_DESCRIPTION

English

DEFAULT_REGION_CODE

EUR

Default region.

DEFAULT_REGION_DESCRIPTION

Europe

DEFAULT_COUNTRY_CODE

UK

Default country.

DEFAULT_COUNTRY_DESCRIPTION

United Britain

DEFAULT_LOCALE_CODE

en-GB

Default locale.

DEFAULT_TIME_ZONE_CODE

CEST

Default time-zone code.

DEFAULT_TIME_ZONE_DESCRIPTION

Europe/Amsterdam

Default time-zone IANA id.

Currency lookup with mandatory variant

CurrencyReaderService exposes both an optional and a mandatory currency lookup by code. The mandatory variant raises a business exception when the code does not exist and is the seam used by other modules that cannot proceed without a known currency. All other entities are read directly through their generated readers.

Public API

SYS_LOC_QueryApi

Read-side facade.

MethodDescription

findLocaleByCode(Code12)

Locale by code, or null.

findTimeZoneByCode(Code8)

Time zone by code, or null.

findLanguageByCode(Code3)

Language by code, or null.

findCurrencyByCode(Code3)

Currency by code, or null.

findCurrencyByCodeMandatory(HasTrace, Code3)

Currency by code; raises a business exception if not found.

SYS_LOC_CommandApi

Currently an empty placeholder — no cross-module write operations are exposed. Other modules treat localization data as read-only at runtime.

SYS_LOC_BootstrapApi

Single entry point bootstrap(HasTrace) — see Bootstrap of default reference data above. Called by the system-wide bootstrap sequence, not by end users.

ViewModel actions

The submodule defines view models for the standard CRUD pages on every entity but does not declare any custom UI actions. Localization data is maintained through the default toolbar.