Skip to main content

Basic Usage of SD Function

The SD (Sonamu Dictionary) function returns translated text matching the current Context’s locale:

Type Safety

Using a non-existent key results in a compile-time error:

Forcing a Specific Locale

Use SD.locale() to get values for a specific locale regardless of Context:

Getting Enum Labels

SD.enumLabels() returns a Proxy with labels for all values of an Enum:

Dictionary Writing Patterns

Key Naming Conventions

Writing Function Values

Use arrow functions when dynamic values are needed:

Using in Models

Helper Functions

Using josa, plural, format

Entity Labels

Auto-extracted labels