Open
Description
Description:
During a discussion, we identified a need to occasionally override automatic translation behavior for field attributes.
For example:
Input::make()->title('User')
In this case, the title
will be automatically translated according to the current application locale.
It would be helpful to have a method to disable this automatic translation inline:
Input::make()->title('User')->withoutTranslation()
This would disable all automatic translations for the field.
Alternatively, if you pass a specific attribute:
Input::make()->title('User')->withoutTranslation('title')
only the specified attribute(s) will be excluded from translation.
Proposed API:
public function withoutTranslation(string|array $attributes = null): static
- If called without parameters — disables translation for all attributes of the field.
- If called with a string or array — disables translation only for those specific attributes.