- How do I install BreezeJP in a Laravel application?
- Install the package with composer require askdkc/breezejp, then run the package's Artisan install command to publish the Japanese language files. After that set your app locale to ja and confirm that a failing validation rule renders in Japanese. No manual service provider registration is required.
- Does BreezeJP work without Laravel Breeze, for example with Jetstream or Laravel UI?
- Yes. BreezeJP ships Japanese language resources rather than application logic, so it works alongside Breeze, Jetstream, Laravel UI, and Livewire or Svelte scaffolds. The validation, auth, password, and pagination translations are also useful in apps that use no starter kit at all.
- Which Laravel versions does askdkc/breezejp support?
- Because the package is essentially a set of language files, it composes with whichever Laravel versions your app already supports rather than pinning a narrow framework range. Some keys, such as the array_keys validation message added in 2.6.3, only take effect on framework versions that actually emit that rule. A caret constraint like ^2.6 lets future patch-level message additions arrive automatically.
- How do I enable the Japanese and English language switcher?
- Set the default app locale to ja and use the package's switcher support to expose a language toggle in your UI. Confirm that the resolved locale is correct on every user-facing surface, including API validation responses, mail, and queued notifications, not just web views.
- Should I publish the lang/ja files or use the translations from vendor?
- Serving translations from vendor means patch releases, including new message keys, arrive on composer update with no file changes. Publishing into lang/ja gives you editable translations but freezes them at publish time, so upstream fixes must be merged by hand. Vendoring is the simpler default unless you need in-repo overrides.
- Do I need to set APP_LOCALE to ja for BreezeJP to work?
- Yes. Set APP_LOCALE=ja and keep APP_FALLBACK_LOCALE=en as a safety net so any missing key falls back to English instead of showing a raw key. If you support multiple languages, confirm the locale is being applied per request rather than only globally.
- Will validation messages be Japanese in API JSON responses too?
- Validation messages come from Laravel's translator, so any response resolved to the ja locale, including JSON 422 validation errors from API routes, will be Japanese. If your API requests resolve to a different locale, those messages will not be translated. Audit each surface where the locale is set.
- How do I get the new array_keys message from version 2.6.3 into an existing install?
- If you consume translations from vendor, running composer update askdkc/breezejp is enough, since 2.6.3 is a single additive array_keys message in validation.php. If you published lang/ja, diff the package's new validation.php against your copy and port only the array_keys line, then commit. Avoid a blanket force re-publish that would clobber in-house overrides.
- Can I customize or override the Japanese translations?
- Yes. Publish the language files into lang/ja and edit the strings, but keep in mind that your copy no longer receives upstream updates automatically. Track a diff against the package's files when you upgrade so new keys and fixes can be merged without losing your customizations.
- Is BreezeJP safe for production and does it add runtime overhead?
- Yes. BreezeJP is language data plus a publish command, with no middleware or request-lifecycle hooks, so the runtime cost is negligible. The real production concern is translation drift, so keep a simple process for tracking upstream Laravel message keys against your published copy. Smoke test rules such as required, email, and array_keys after each update.