bifog's avatar
Level 1

Translation strings for validation in lang folder

Is there any location I can download those 4 files (auth.php, pagination.php, passwords.php, validation.php) in my language?

I can translate it myself but it's a lot of strings. Like at least 30 - 45 minutes of retyping stuff. So, I am asking before I embark on the Via Translatia ;)

0 likes
7 replies
bifog's avatar
Level 1

Am I missing something? I can see only this:

Laravel-Lang/lang/tree/main/locales/pl

which has files of a completely different format in json.

but I need this:

Laravel-Lang/lang/tree/main/source/laravel/9.x

of course, in my language ;)

1 like
bifog's avatar
Level 1

@tykus I am looking for translation - those 4 files. I don't want to install anything. Especially 3rd party. On their page I read this: "Therefore, you will need to either manually update your PHP and JSON files, replacing the keys in them, or use a publisher" Then I go to publisher and it's even more complicated and they say that they don't include some installation of (?the previous plugin). At that point I really don't see a point of installing anything and I just will manually translate copy those strings and NEVER EVER share anything with anybody.

If there is not other way I do it manually. To be honest it's weird. There are translations for Codeigniter you can download on GH: codeigniter4/translations/tree/develop/Language/pl I need something similar for Laravel? There really is no translations in the form of those 4 files for Laravel? Why?

I am sorry but I am kind off getting very strange vibes out of Laravel for some reason. The most popular PHP framework in the world and you can't find lang/pl/ anywhere on the Internet ;D.

That's like 100 strings max. And they rarely change from version to version. Why can't Laravel.com offer them by default? Or perhaps php artisan lang:download pl ? Jesus, I am asking for so much, right?

1 like
tykus's avatar

@bifog tried to help; if it works for you, great. If not; fare well 👍

bifog's avatar
Level 1

@tykus I did that manually. I copy pasted the strings. It wasn't as bad. Only the validation translations are long. The other 3 files are 2 to 4 strings.

Still, why isn't this supported officially? Those translations are basically the same in every version. Perhaps 1 or 2 things change here and there - if at all.

atorscho's avatar

Oh, I have exactly the same problem. I really don't get why it's impossible to find these files. Laravel Lang used to have them available on their GitHub account (and in the past even Laravel itself). Now – absolutely! It's really annoying.

@tykus why would one need to download a whole new package (and thus requiring another dependency) when it's only a handful of static PHP files with hard-coded strings in them? That's a genuine question. Maybe there's a point I just don't see.

@bifog apparently the simplest (even though not the quickest) way to do it is run php artisan lang:publish and use a translation service (Google, ChatGPT) to translate each file into your language.

Another way I found, to bypass a 3rd-party package of course, is to find your strings in https://github.com/Laravel-Lang/lang/blob/main/locales/{locale}/php.json. It seems that translations from all 4 default files are combined here (e.g. validation, auth, etc)

Please or to participate in this conversation.