1

I am using Magento 2.2.7 and theme Techno from Themevast. My app/code/design structure looks like this:

frontend/tv_themevast_package/default
frontend/tv_themevast_package/techno1

Template is using both folders.

I have created i18n in both folders for my translations

frontend/tv_themevast_package/default/i18n/hr_hr.csv
frontend/tv_themevast_package/techno1/i18n/hr_hr.csv

and translations from techno1 seem to be loading but translations from default are not.

I have tried putting translations from default into file that is in techno1 but that didn't help.

When I was translating I have imported CSV file into excel, where I have created translations, and after that had to copy it to Google Sheets in order to get CSV file with double quotes as was in original. Later I noticed that there are elements in translations like:

"Only registered users can write reviews. Please <a href=""%1"">Sign in</a> or <a href=""%2"">create an account</a>","Only registered users can write reviews. Please <a href=""%1"">Sign in</a> or <a href=""%2"">create an account</a>"

So as suggested I have tried replacing double-double quotes with &quot; but that didn't help.

"Only registered users can write reviews. Please <a href=&quot;%1&quot;>Sign in</a> or <a href=&quot;%2&quot;>create an account</a>","Only registered users can write reviews. Please <a href=&quot;%1&quot;>Sign in</a> or <a href=&quot;%2&quot;>create an account</a>"

So question is:

How can I use translations for default template?

1 Answer 1

1

First change name hr_hr.csv to hr_Hr.csv

if this doesn't help, check that you don't have any space between ","

and last one:

Try to use:

/yourvendor/yourTheme/Magento_Reviews/i18n/hr_Hr.csv

"Only registered users can write reviews. Please <a href=""%1"">Sign in</a> or <a href=""%2"">create an account</a>","Only registered users can write reviews. Please <a href=""%1"">Sign in</a> or <a href=""%2"">create an account</a>"

or you need add ,module,Magento_Review at the end of translation:

"Only registered users can write reviews. Please <a href=""%1"">Sign in</a> or <a href=""%2"">create an account</a>","Only registered users can write reviews. Please <a href=""%1"">Sign in</a> or <a href=""%2"">create an account</a>",module,Magento_Review

Croatian language pack from mageplaza: https://www.mageplaza.com/magento-2-croatian-language-pack.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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