Can anyone help me why these strings in the php are not translatable? How am I supposed to change the code, so that the "Jhon" & "Doe" placeholders can be translatable using PO edit?
'first_name_input' => [
'type' => 'text',
'name' => 'first_name',
'id' => 'first_name' . esc_attr( $id ),
'placeholder' => ($settings['first_name_placeholder']) ? $settings['first_name_placeholder'] : 'Jhon',
'class' => [
'first_name',
'bdt-input',
'bdt-form-' . $settings['input_size'],
],
],
'last_name_input' => [
'type' => 'text',
'name' => 'last_name',
'id' => 'last_name' . esc_attr( $id ),
'placeholder' => ($settings['last_name_placeholder']) ? $settings['last_name_placeholder'] : 'Doe',
'class' => [
'last_name',
'bdt-input',
'bdt-form-' . $settings['input_size'],
],
],
Many thanks in advance.
This is the similar of
<input type='text'.... placeholder='anything here'>So you cant really translate it directly because you will be in fact changing programming parameters, but answering your question, i think it will do the trick:
'placeholder' => ($settings['first_name_placeholder']) ? $settings['first_name_placeholder'] : 'Your Name''placeholder' => ($settings['last_name_placeholder']) ? $settings['last_name_placeholder'] : 'Your Last Name'Change "Your Name" and "Your Last Name" to whatever you want and it'llbe ok :)