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

Your Answer

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

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