Internationalization
Configure locale behavior and translation providers.
Allowed Locales
Your app already supports switching via POST /locale and GET /locale/{locale}. Allowed: en, es, pt.
Edit this list in routes/web.php (look for the Localization & Currency block) or move it to a config file if you prefer.
OpenAI API Key (for translations)
Set in your server .env as OPENAI_API_KEY. Example:
OPENAI_API_KEY=sk-...
Then use it in your translation jobs/services (e.g., calling OpenAI from a queued job).
Google Translate API Key (optional)
Set in .env as GOOGLE_TRANSLATE_API_KEY (or use Google Application Default Credentials). Example:
GOOGLE_TRANSLATE_API_KEY=AIza...
Choose one provider (OpenAI or Google) in your translation code path.
Default Locale
Set APP_LOCALE (and APP_FALLBACK_LOCALE) in .env:
APP_LOCALE=pt APP_FALLBACK_LOCALE=en
Users can still switch via the existing routes; the defaults affect first load.