Hi, I have this code snippet:
$this->Flash->success('Reset password link has been sent to your email ('.$myemail.'), please open your inbox');
is a message that appears on the screen, once the user requests to reset their password.
$myemail is the variable that stores the email that is entered.
This is the code I use for lore in my .po file
msgid "Reset password link has been sent to your email ('.$myemail.'), please open your inbox"
msgstr "El enlace para restablecer la contraseña se ha enviado a su correo electrónico ('.$myemail.'), abra su bandeja de entrada"
I am using cakephp, like fremawork. the way i'm doing it, the message is not translated. Perhaps because of having a concatenated variable in said message. Do you have any idea how I should correct it?
I did it in the following way:
I placed the message first and then concatenated the variable that shows the email to which the message is sent, in this way the variable is outside the message to be translated and does not cause problems for its translation. the code in the.po file looks like this:
here I no longer place the variable, as I did before. This way works fine for me.
Note: There are also other ways to place the variables when making these translations, you should consult the documentation a little more.