Welcome Guest, Not a member yet? Register   Sign In
Validation field label language
#9

(04-28-2020, 08:08 AM)Leo Wrote:
PHP Code:
                'site_name'             =>      ['label' => 'App.site_name''rules'  =>  'required'],
        ]; 

But still give site_name, not what site_name in App language file.

Hi. Not sure, about user guide. When I had to make a custom language thing in my code I wrote like this:

'site_name'             =>      ['label' => lang('language_file.site_name', [], 'language_folder'), 'rules'  =>  'required'],

This was written in controller, so I'm not sure if it answers your question. But you can try it.


I can not access lang() function in property declarations:


PHP Code:
protected $validationRules      =   [
'site_name'             =>      ['label' => lang('language_file.site_name', [], 'language_folder'), 'rules'  =>  'required'],
]; 
Reply


Messages In This Thread
Validation field label language - by maaa.om - 04-20-2020, 11:53 AM
RE: Validation field label language - by maaa.om - 04-22-2020, 06:56 AM
RE: Validation field label language - by jreklund - 04-22-2020, 10:20 AM
RE: Validation field label language - by maaa.om - 04-27-2020, 08:39 AM
RE: Validation field label language - by jreklund - 04-27-2020, 10:25 AM
RE: Validation field label language - by maaa.om - 04-27-2020, 10:40 AM
RE: Validation field label language - by Leo - 04-28-2020, 08:08 AM
RE: Validation field label language - by maaa.om - 04-30-2020, 12:59 PM
RE: Validation field label language - by jreklund - 04-27-2020, 10:50 AM
RE: Validation field label language - by michalsn - 04-30-2020, 01:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB