laravel / ideas

Issues board used for Laravel internals discussions.
940 stars 28 forks source link

Parameters when using translation strings as keys #1339

Open igorlopasovsky opened 6 years ago

igorlopasovsky commented 6 years ago

Would it be possible to replace parameters in translation strings (https://laravel.com/docs/5.7/localization#replacing-parameters-in-translation-strings) while using translation strings as keys(https://laravel.com/docs/5.7/localization#using-translation-strings-as-keys)?

As far as I figured it out, parameters are not allowed to be used this way.

Patryk27 commented 6 years ago

What's your use case?

At first glance it seems you're doing something wrong :-P

igorlopasovsky commented 6 years ago

Our use case is quite simple - we have hundreds of strings to translate and exactly as described in Laravel documentation (https://laravel.com/docs/5.7/localization#using-translation-strings-as-keys), it's getting quite confusing using keys. It's much easier to use translation strings as keys. I hope it makes sense :)