{{ $this->excerpt() }}
@endunless {{ __('Read more') }}{{ __('blog::messages.post.by', ['author' => $post->author->name]) }}
``` JSON translations are **not** namespaced — that is how Laravel's JSON loader works, for packages and applications alike: ```php __('Read more'); ``` Which means your JSON keys share one global space with the application's. Keep them few, and keep them specific enough not to collide; anything ambiguous belongs in a namespaced PHP file. ## Language directory validation Every subdirectory is checked against the toolkit's `Support\Enums\Language` enum — the ISO 639-1 set, 180-odd codes. An unrecognised one throws during registration: ```text Invalid language directory [/…/lang/english]. Directory name must be one of the supported languages. ``` The check is there because a mistyped locale directory does not fail loudly on its own — Laravel simply never finds the translations, and the fallback locale is served instead. Failing at registration turns a silent content bug into an immediate one. **Region locales are supported.** Only the language part before a `-` or `_` is validated, so `pt_BR`, `en-US` and `zh_CN` all pass. ```php use NyonCode\LaravelPackageToolkit\Support\Enums\Language; Language::codes(); // Collection