Jump to content

Translate a new field


Marwa Abdelkader

Recommended Posts

13 minutes ago, ComGrafPL said:

If you used module for it, find the translation. If add by code. Find in presta theme translation. Show the link.

Thank you for you answer.

I don't find the link . However i use code of added declaration of fields ("

   $format['businessphone'] = (new FormField)

            ->setName('businessphone')

            ->setLabel(

                $this->translator->trans(

                    'Business phone', [], 'Shop.Forms.Labels'

                )

            )

            ->setRequired(true)

        ;

") in file file "CustomerFormatter.php" and this  field in theme translation i dont' find it.

Link to comment
Share on other sites

Probléme Résolu :

Add the fields that you want to translate for example (Business phone) in the /classes/form/CustomerFormatter.php file

• Access the site “https://www.md5.fr/” and generate each field their translation id

• After accessing the language you translate the field from this path / app / Resources / translations / ShopFormsLabels.fr-FR.xlf (this file contains the translation of the account creation form fields ”) • Addition of this format with the id of each field generated by the site ““ https://www.md5.fr/ ””

          <trans-unit id="" approved="yes">

        <source>Business phone</source>

        <target xml:lang="fr" state="translated">Téléphone de travail</target>

        <note>Line: 225</note>

      </trans-unit>

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...