Author Topic: Language not displaying  (Read 4619 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +43/-1
    • View Profile
Language not displaying
« on: December 05, 2022, 11:37:07 PM »
Hi I am trying to add a radio button on \storefront\controller\pages\account\subscriber.php Line #138

Code: [Select]
$this->data['form']['newsletter_type'] = $form->getFieldHtml(array(
            'type'    => 'radio',
            'name'    => $this->language->get('text_newsletter_type'); // tried  'label'    => $this->language->get('text_newsletter_type'); // 'name'    => 'Newsletter Type:', // nothing displays label
            'value'   => '1',
            'options' => array(
                '1' => 'Digital',
                '0' => 'Print',
            ),
        ));

added this to storefront\language\english\account\newsletter.xml

   <definition>
      <key>text_newsletter_type</key>
      <value><![CDATA[Newsletter Type:]]></value>
   </definition>

on the form I am not able to get label to display, options are displaying. I don't mind hardcoding this word in subscriber.php but I need a label for those radio button.  I did clear browser cache and system cache
Can someone point my mistake? or help me how to fix it
« Last Edit: December 06, 2022, 01:22:12 AM by Basara »

Offline maxter

  • Full Member
  • ***
  • Posts: 228
  • Karma: +64/-0
    • View Profile
Re: Language not displaying
« Reply #1 on: December 06, 2022, 07:44:56 AM »
If language was already loaded in the database before, new text key might not be picked up.
Try to do the following:

1. Delete all text entries for english/account/newsletter in the admin language definition section (or database)
2. clear language cache.

This should resolve the issue.

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +43/-1
    • View Profile
Re: Language not displaying
« Reply #2 on: December 15, 2022, 04:44:56 PM »
I tried doing that but still no luck.  Even hardcoding is not working. Strange thing is just the name part is not working rest everything is fine

'name'    => 'Select Type'

is also not working

 

Powered by SMFPacks Social Login Mod