Laravel-Lang / lang

List of 126 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova, Laravel Spark and Laravel UI.

Home Page:https://laravel-lang.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with transalting Laravel UI auth pages

ax-ross opened this issue · comments

Environment

  • Laravel-Lang Version: 10.9.1
  • Laravel Version: 9.15.0
  • PHP Version: 8.1.6

Issue description

Hello, today i have a problem: my registration and login pages was not translated (I'm using laravel ui auth). In blade template I saw, that laravel ui auth used __ function for get translating on key. In my file lang/ru/ru.json was this key. But __ function didn't found this. I looked how __ function working and i saw, that this function found file ru.json in folder lang/ without subfolder.
I fixed my problem: i just moved file ru.json to lang/ directory.

Steps to reproduce

I installad laravel lang: composer require laravel-lang/lang --dev. Then I copied folder vendor/laravel-lang/lang/locales/ru to lang/ru.

Hello!

This package contains translation files that must be manually installed. What we report on the installation page.

To automate the process of installing translations into your application, use our publisher.

image

And one more thing: json files should be on the path lang/ru.json, not lang/ru/ru.json.

See https://laravel.com/docs/9.x/localization#using-translation-strings-as-keys

image