Marwa Abdelkader Posted September 14, 2021 Share Posted September 14, 2021 How to translate a new field add to the form account creation?? Link to comment Share on other sites More sharing options...
ComGrafPL Posted September 14, 2021 Share Posted September 14, 2021 6 hours ago, Marwa Abdelkader said: How to translate a new field add to the form account creation?? If you used module for it, find the translation. If add by code. Find in presta theme translation. Show the link. Link to comment Share on other sites More sharing options...
Marwa Abdelkader Posted September 14, 2021 Author Share Posted September 14, 2021 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 More sharing options...
ComGrafPL Posted September 15, 2021 Share Posted September 15, 2021 Store link and tell exactly which phrase you need to translate. Link to comment Share on other sites More sharing options...
Marwa Abdelkader Posted September 15, 2021 Author Share Posted September 15, 2021 3 hours ago, ComGrafPL said: Store link and tell exactly which phrase you need to translate. I do not understand the link you mentioned !! and the phrase "Business phone" that I want to do the translation Link to comment Share on other sites More sharing options...
Marwa Abdelkader Posted September 16, 2021 Author Share Posted September 16, 2021 someone has a solution!! Link to comment Share on other sites More sharing options...
Marwa Abdelkader Posted September 17, 2021 Author Share Posted September 17, 2021 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now