मैं Prestashop 1.5 के लिए एक मॉड्यूल के विकास कर रहा हूँ।PrestaShop ईमेल स्थानीयकरण
मैं इस तरह ईमेल भेज रहा हूँ (प्रलेखन वास्तव में याद आ रही है, मैं अन्य डिफ़ॉल्ट घटकों का अध्ययन किया और इस मैं अब तक मिल गया है)
Mail::Send(
$this->context->language->id, //int $id_lang
'template_name',//string $template
//Mail::l('Hello', $this->context->language->id),//string $subject
$this->l('Email subject'),//string $subject
array('{discount}' => $code,
'{firstname}' => $customer['firstname'],
'{lastname}' => $customer['lastname'],
'{img_url}' => $img_url,
'{valid_days}' => $form['days_valid']
),//string $template_vars
$customer['email'],//string $to
implode(' ', array_filter(array($customer['firstname'], $customer['lastname']))),
strval(Configuration::get('PS_SHOP_EMAIL')),//string $from
strval(Configuration::get('PS_SHOP_NAME')),//string $from_name
/* null,//string $from
null//string $from_name */
null,//array $file_attachment
null,//$mode_smtp
$template_path//string $template_path /*__PS_BASE_URI__.'modules/'.$this->name.'/mails/' */
);
नोट मैं
Mail::l('Hello', $this->context->language->id),//string $subject
और का उपयोग कर की कोशिश की
$this->l('Email subject'),//string $subject
ईमेल के विषय के रूप में
।
और मुझे मिल रही है "कोई विषय के लिए मिला था ..."। ग्राहक को प्राप्त करने वाला हार्डकोडेड स्ट्रिंग जो मैं स्रोत कोड में डालता हूं।
तो कैसे इस त्रुटि से छुटकारा पाने के: प्लस ईमेल जाहिरा तौर पर यादृच्छिक भाषा में भेजे जाते हैं (कभी कभी अंग्रेज़ी, कभी कभी इतालवी)।
लेकिन मैं इस स्थापित घटक पर स्वचालित रूप से किया और एक तरह से है कि यह उपयोगकर्ता कुछ लेबल – max4ever
को संशोधित करना चाहिए यह कार्य स्वचालित रूप से अगर आप 'का उपयोग मेल :: एल ('ईमेल विषय', $ इस- हटा दिया जाता है नहीं करता है में की जरूरत है > संदर्भ-> भाषा-> आईडी) 'मेल :: विषय के विषय पैरामीटर में। – SJousse
मैं मॉड्यूल का विस्तार कर रहा हूं और आप नियंत्रकों के बारे में बात कर रहे हैं, कुछ सही नहीं है – max4ever