Closed safakocamanoglu closed 3 years ago
can you give me a example.
Example
Default Laravel localization system: resources > lang > en > content.php
<?php
return [
"validate.title" => "Example Title",
"validate.title_max" => "Title cannot exceed :max characters",
];
Usage on blade file
{{ __('content.title'); }}
autput: "Example Title"
{{ __('content.validate', ['max' => 3']); }}
autput: "Title cannot exceed 3 characters"
Usage after moving content.php file to theme translation folder Themes > theme-name > lang > en > content.php
<?php
return [
"validate.title" => "Example Title",
"validate.title_max" => "Title cannot exceed :max characters",
];
Theme lang usage on blade file
{{ __('content.title'); }}
autput: "Example Title"
{{ __('content.validate', ['max' => 3']); }}
autput: "Title cannot exceed :max characters"
As a result, we have no problems with normal use of the theme translation file. It cannot process this parameter value on the blade while performing parameterized translation. I asked for your support in this matter.
please update themevel package. it's available in v3.0.1
.
I want to add a different issue here Is there any way we can run the translation en.json file in the theme folder?
it's a different feature, currently it's not available. you can add by yourself or you can contribute .
Hi, the parameters options are not available when using the translation feature. Can you help with this?