Support the ongoing development of Laravel.io →
posted 10 years ago
Views
Last updated 2 years ago.
0

You can use the lang files. You don't want to translate the html. You want to translate text nodes. Check the Laravel docs on localization.

eg.

<h1>{{ Lang::get('forms.contact-form.first-name') }}</h1>

It would be better if you could do the translation in a dedicated translator class rather than in the view as well. Then the view is just passed strings that were already translated.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

dmitry-php dmitry-php Joined 26 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.