Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation template for labels #399

Merged
merged 1 commit into from
Feb 13, 2018

Conversation

koenvu
Copy link
Contributor

@koenvu koenvu commented Jan 5, 2018

In some of our projects we use a language line system of:

'fields' => [
    'email' => [
        'label' => 'Email address',
        'placeholder' => '',
        'tooltip' => '',
        'help' => '',
    ],
    'password' => [
        'label' => 'Password',
        'placeholder' => '',
        'tooltip' => '',
        'help' => '',
    ],
    'submit' => [
        'label' => 'Log in',
    ],
],

This doesn't work with the current language_name functionality and would force us to manually write trans('customer.login.fields.email.label') for all fields.

This new functionality is fully backwards compatible with the old code, as long as you didn't use translation_template for custom functionality yet (highly unlikely).

Would love to hear what you think, and if you like it when you plan to release a new version.

Thanks in advance!

@wouterrutgers
Copy link

This would be very nice for my project as well!

@kristijanhusak kristijanhusak merged commit 9861696 into kristijanhusak:master Feb 13, 2018
@kristijanhusak
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants