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

Added ability to translate the labels of the field keys in the generated content template. #161

Closed
wants to merge 1 commit into from

Conversation

bertoost
Copy link

Keys are prefixed with contact_form., so you can define something like contact_form.name for the label in the site.php translations file.
Also a check, if the translation doesn't exist, it returns the generated-key, then it falls back to the original key (as it was before).

Added ability to translate the labels of the field keys in the generated content template.

Keys are prefixed with `contact_form.`, so you can define something like `contact_form.name` for the label in the `site.php` translations file.
Also a check, if the translation doesn't exist, it returns the generated-key, then it falls back to the original key (as it was before).
@bertoost
Copy link
Author

Also applied lcfirst() so keys like Email become contact_form.email instead, or contact_form.lastName etc.

@brandonkelly
Copy link
Member

Added this for the next release.

It only applies to custom message keys rather than all keys (everything else can use the contact-form category already), and there’s no contact_form. prefix for the translation keys.

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.

2 participants