Basic Usage of SD Function
TheSD (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
UseSD.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