Jump to content

How to translate strings in a class (or override) in 1.7.5 ?


TinoArts

Recommended Posts

I've added a new field to the CustomerFormatter.php class:

$format['birthday'] = (new FormField())
                ->setName('birthday')
                ->setType('text')
                ->setLabel(
                    $this->translator->trans(
                        'Birthdate', [], 'Shop.Forms.Labels'
                    )
                )
                ->addAvailableValue('placeholder', Tools::getDateFormat())
                ->addAvailableValue(
                    'comment',
                    $this->translator->trans('We will send you a birthday present every year (E.g.: %date_format%)', array('%date_format%' => Tools::formatDateStr('31 May 1970')), 'Shop.Forms.Help')
                )
            ;

 

I need to translate the "We will send you..." label, but I can't find it in the BO. What appeared reasonable for me was to look into active theme's translations, or "Other translations", but I've looked everywhere and it's not there. I'm not sure I am setting the domain right.

What is the correct way to do this?

Thank you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...