Skip to content

Locale Types

Locale types store standardized international codes.

TypeExpands ToStandard
col.country()string(2)ISO 3166-1 alpha-2
col.currency()string(3)ISO 4217
col.locale()string(10)BCP 47
col.timezone()string(50)IANA
schemas/auth/user_preference.js
export default table({
id: col.id(),
country: col.country(),
currency: col.currency(),
locale: col.locale(),
timezone: col.timezone(),
});

Country: US, GB, DE, JP, BR

Currency: USD, EUR, GBP, JPY, BRL

Locale: en-US, en-GB, de-DE, ja-JP, pt-BR

Timezone: America/New_York, Europe/London, Asia/Tokyo