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

Make Singular Label and Plural Label Translatable #113

Open
amidesfahani opened this issue Oct 9, 2020 · 1 comment
Open

Make Singular Label and Plural Label Translatable #113

amidesfahani opened this issue Oct 9, 2020 · 1 comment

Comments

@amidesfahani
Copy link

Make Singular Label and Plural Label Translatable

$this->singularLabel = Str::singular($this->name);
$this->pluralLabel = Str::plural($this->name);

suggest:

$this->singularLabel = $resource::singularLabel();
or
$this->singularLabel = __(Str::singular($this->name));
@IbrahemElanany
Copy link

IbrahemElanany commented Apr 14, 2021

you can take new object from NestedForm then override variable value
EX:
$nestedForm = new NestedForm($name, $attribute, $resource)
$nestedForm->pluralLabel = "name you want"

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

No branches or pull requests

2 participants