orchidsoftware / orchidsoftware/platform
Add ability to selectively disable automatic translation for field attributes
Open
@tabuna is already working on this.
Since May 23, 2025.
Additions
- Dominant language
- PHP
- Stars
- 4.8k
- Forks
- 663
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.