8

I'm trying to change the following in a custom translation file but can't get it to work:

"Check "Remember Me" to access your shopping cart on this computer even if you are not signed in."

to

"Check "Remember Me" to access your shopping basket on this computer even if you are not signed in."

I have tried the following:

"Check \"Remember Me\" to access your shopping basket on this computer even if you are not signed in."

"Check ""Remember Me"" to access your shopping basket on this computer even if you are not signed in."

"Check \"\"Remember Me\"\" to access your shopping basket on this computer even if you are not signed in."

It's in a csv file that has other translations in that do work

5
  • Can you please provide what steps you tried follow to do the above mentioned changes ? Aug 3 '16 at 10:31
  • I have now added what I have tried. This sentence isn't affected by a JS file is it? It's part of the "Whats this" tool tip for "Remember Me"
    – Mark
    Aug 3 '16 at 10:38
  • Try \"Remember Me\" ... backslash (\) to escape the double quotes Aug 3 '16 at 10:46
  • Sorry just edited they should have been \
    – Mark
    Aug 3 '16 at 10:50
  • Try "Check \"Remember Me\" to access your shopping basket on this computer even if you are not signed in." Aug 3 '16 at 10:53
7

Did a little bit of digging for this found it here:

vendor/magento/module-persistent/i18n/en_US.csv

The line states:

"Check "Remember Me" to access your shopping cart on this computer when you are logged out","Check "Remember Me" to access your shopping cart on this computer when you are logged out"

So you need to change this in your custom CSV file:

"Check "Remember Me" to access your shopping cart on this computer when you are logged out","Check "Remember Me" to access your shopping basket on this computer when you are logged out"

Hope this helps !!

18

you have to double the quotes in your language file.

"Check ""Remember Me"" to access","Check ""Remember Me"" to access"
|      \|           \|          |
|       |            |          |
|       |------------|          |
|              |                |     
|           will be             |
|         transformed           |
|         to one "              |
|-------------------------------|
           |
           |
     used by the csv format as delimiter                 
1
  • Interesting approach.. why couldn't they simply have escaped it?
    – Erfan
    Oct 28 '20 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.