I want to translate some words in my project but I can't see why they didn't get translated, even if i added them to the folder "i18n" some words was translated but those not

here is some word they can't get translated :

$fieldsetCustomer = $form->addFieldset(
            ['legend' => __('Age: ')]
 $this->options = [
            ['label' => '-', 'value' => ''],
            ['label' => 'Male', 'value' => 'male'],
            ['label' => 'Female', 'value' => 'Female'],


Can someone tell why they can't get translated please ?


at 1. You should use __('string') for every text You want to translate. at 2. How You added in to i18? Are You sure You did it correctly?

| improve this answer | |
  • yes , i have added it correctly like this : "text","new text" – David montera May 22 at 10:07
  • but what about naming of file? Maybe in translation file You should use mapping for specific module where this translation should be use – Konrad Siamro May 22 at 10:13
  • also, i was added it correctly , because i do the same for other words and it works , just those are not translated – David montera May 22 at 10:16

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.