String translation on submit buttons and error/success messages Home › Forums › User Registration › String translation on submit buttons and error/success messages This topic contains 8 replies, has 2 voices, and was last updated by Rodrigo Montiel 1 year, 2 months ago. Viewing 9 posts - 1 through 9 (of 9 total) Author Posts August 20, 2018 at 3:20 pm #3353 Rodrigo MontielParticipant Hello, I’m not being able to translate the strings used for the submit buttons (e.g. “Save changes”) on the forms (change password, edit profiel, etc.) I also cannot translate the strings that appear for error/success messages (e.g. “User profile updated successfully.”). I’ve noticed in the templates the use of the “esc_attr_e” function. I do not know if that has anything to do with it as I have no problems with the ones using the “_e” function. I’m using Polylang plugin to translate my site. I was able to translate almost all strings but these. Thank you. August 22, 2018 at 4:53 am #3378 sanjeev3Member Hello Rodrigo, All those strings are translation ready. You can see in languages/user-registration.pot. And we could translate those strings in our test server. Please make sure of it. And, we will get back to you! Thanks! August 23, 2018 at 3:59 pm #3444 Rodrigo MontielParticipant Hello, Thank you for your answer. I see the .pot file inside the languages folder of the plugin. I’ve started to translate the file and created .mo and .po files. I’m placing the generated files inside my wp-content/languages/plugins folder but I’m not seeing the changes (e.g. with Front-end messages and the buttons on the forms). I’m naming the files like this: user-registration-es_ES.mo user-registration-es_ES.po I’m in doing it in the correct way? Thank you in advance August 24, 2018 at 3:59 am #3456 sanjeev3Member Hello Again, The submit button and frontend messages are fetched from the database. You can customize frontend messages from User Registration->Settings->General->Frontend Messages and the submit button from User Registration->Select your form->Form settings->Submit button label. These are not translatable for now. Sorry for that. We are looking into it too. And yes. The correct place to store translations is wp-content/languages/plugins/. However, highly recommended method is to help translate plugin from wordpress.org because it not only helps you use the plugin in your language, but it also helps other users automatically use the plugin in their language. https://translate.wordpress.org/projects/wp-plugins/user-registration. Regards, WPEverest Support August 24, 2018 at 1:33 pm #3460 Rodrigo MontielParticipant Hello, Yes, the front-end messages from the settings options I’m able to configure. I’m not being able to translate the error and success messages that appear after submitting a form, for example. Also the text inside form buttons like “Login”. I’v tried including the .po and .mo files inside the languages folder with no success. Also I can’t seem to find the error message string for the error “ERROR: The password field is empty”. https://ibb.co/keRMF9 Where are these strings coming from? Do I need to do something else? Please I need to translate the messages to Spanish. I’m happy to contribute my translation to the community but I can’t seem to make it work. Thank you August 27, 2018 at 7:03 am #3473 sanjeev3Member Hello Montiel, Those are also translation ready. You can search for those words in User Registration->languages->user-registration.pot. Some of the error messages are coming from WordPress core. Hope you have translated the core too. Also, here is the screenshot using locotranslate: https://ibb.co/f9GB3U, https://ibb.co/b7PCcp Are you using plugin to transalate the strings? Regards, WPEverest Support August 27, 2018 at 1:31 pm #3474 Rodrigo MontielParticipant Hello Sanjeev3, I’ve set up WordPress in Spanish as default so I see general and core messages fine, as well as other plugins that are translated in Spanish. I’ve been using Poedit for translating the .pot file and I’ve also tried Locotranslate as you mentioned. I’ve created the respective ” user-registration-es_ES.mo ” and ” user-registration-es_ES.po ” files. I’ve tried locating them inside the /languages/ folder of the plugin, and also in the wp-content/languages/plugins folder, but the changes are not taking effect, I still see the messages in english. I’ve also tried editing the .pot file directly, cleaning my WordPress and broswer cache, but I cannot see the translations. I don’t understand why is not working. I was asking about the specific string for the error message “ERROR: The password field is empty” because I don’t see it in the .pot file. Is this string coming from WordPress core? Where can I find it? Thank you. What could be the cause of this? August 28, 2018 at 4:15 am #3487 sanjeev3Member Hello Montiel, Yes. The string ERROR: The password field is empty is from the wordpress core. Should be auto translated to chosen language. Here is the screenshot: https://ibb.co/ntvkXp Thanks! August 29, 2018 at 4:09 pm #3517 Rodrigo MontielParticipant Hello sanjeev3, Problem solved! There was an issue with another of the plugins I was using “Polylang Theme Strings”. I’ve disabled it and the translations are taking effect. I’ve translated several strings so I’ll be posting my changes to the community soon! Thank you. Author Posts Viewing 9 posts - 1 through 9 (of 9 total) You must be logged in to reply to this topic.