Shipu / themevel

Theme and asset management for laravel
Creative Commons Zero v1.0 Universal
347 stars 67 forks source link

Localization Parameter #55

Closed safakocamanoglu closed 3 years ago

safakocamanoglu commented 3 years ago

Hi, the parameters options are not available when using the translation feature. Can you help with this?

Shipu commented 3 years ago

can you give me a example.

safakocamanoglu commented 3 years ago

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.

Shipu commented 3 years ago

please update themevel package. it's available in v3.0.1.

safakocamanoglu commented 3 years ago

I want to add a different issue here Is there any way we can run the translation en.json file in the theme folder?

Shipu commented 3 years ago

it's a different feature, currently it's not available. you can add by yourself or you can contribute .