Documentation: https://hypervel.org/docs/localization
Translator::setLocale()changes the locale only for the current coroutine and does not affect other concurrent requests in the worker. Use the boot-onlysetBaseLocale()method to change the worker's default locale. ThesetFallback()method likewise changes the fallback shared by the worker.Translatorrejects JSON translation files whose top-level values are not strings or arrays, naming the file and key. Anullvalue is allowed and means the key is untranslated.setLocale(),setBaseLocale(),setFallback()andFileLoader::load()throwInvalidArgumentExceptionfor locales containing path separators,..or null bytes, or equal to.. A locale passed directly toget()is therefore rejected when it is loaded from files. Laravel's file loader returns no lines for them instead. Validate user-supplied locales before using them.
Ported from: https://github.com/laravel/framework