i18n
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Successful in 8s
CI/CD Pipeline / i18n Catalog Check (push) Failing after 10s
CI/CD Pipeline / Build and Push App Docker Image (push) Skipped
CI/CD Pipeline / Deploy to Kubernetes (push) Skipped

This commit is contained in:
2026-08-08 15:29:40 -07:00
parent 22c282d8fa
commit 0a7b5fa00f
178 changed files with 13099 additions and 1285 deletions
+12
View File
@@ -0,0 +1,12 @@
import type { I18n } from "@lingui/core";
import { createI18n, resolveLocale } from "@/lib/i18n";
/**
* Server-side i18n instance for the requester's locale, for use with
* msg`` descriptors + i18n._() when localizing API route error strings.
* Pass the SuperTokens user metadata (or undefined/null for anonymous
* requests) — falls back to DEFAULT_LOCALE when no locale is set.
*/
export function localizedFor(metadata?: { locale?: string } | null): I18n {
return createI18n(resolveLocale(metadata?.locale));
}