2

I want to translate quantity error message. enter image description here

I changed in

app/design/frontend/Smartwave/porto/i18n/fi_FI.csv

"We don't have as many ""%1"" as you requested.","Meillä ei ole pyytämääsi määrää tuotetta ""%1"".",module,Magento_CatalogInventory 

and run php bin/magento setup:static-content:deploy fi_FI command but it's not working

1
  • before run command of deploy you need to run setup:upgrade command. did you try this one ? Commented Jun 29, 2019 at 7:14

3 Answers 3

1

There was the same msg in the fi_Fi.csv which contain the translation in English language only. So I just removed that line from the file.

1

When you do translation you don't need to pass ""%1"".

example :

"Get %1 off","obtenez %1 de réduction" - this will be you CSV file 

in you PHTML file you should have :

$discount = $block->getDiscount(); - if your using block $discount = $viewModel->getDiscount(); - if you are using view model <?= __("Get %1 off", $discount) ?> 
-1

Try following way..

"We don't have as many ""%1"" as you requested.","Meillä ei ole pyytämääsi määrää tuotetta ""%1""." 

i have above code translate in fr langugage this work good for me

"We don't have as many ""%1"" as you requested.","Nous ne possédons pas suffisament de ""%1"" pour honorer votre demande." 

Note: Clear cache (php bin/magento cache:clean) and check your changes.

4
  • I tried, it's not working Commented Jun 29, 2019 at 8:53
  • not possible @BhaktiThakkar i have checked my side working fine and you have search all project any module override this text and csv file available Commented Jun 29, 2019 at 8:55
  • I add this line in /app/design/frontend/Smartwave/porto/i18n/en_US.csv Commented Jun 29, 2019 at 9:10
  • github.com/bthakkar96/EnglishToFinnish/blob/master/en_US.csv Commented Jun 29, 2019 at 9:10

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.