WebsiteBaker Support (2.8.x) > Bakery Shop

How to fix laguage issue with e-mail confirmation

<< < (2/4) > >>

rumen:
I bought from the Bulgarian version, by definition it should use the Bulgarian file language. But in the e-mail I get the English version.

It is strange also that I choose "Method of payment" to be a "Cash on delivery" - I save the settings and when I enter again on the place, where is the method of payment is "Advance payment" see the pic's:





 

rumen:
And the issue with the e-mail confirmation is the same (texts like Thank you for shopping at apokalypsabg.org. should be in Bulgarian in this case.):


--- Code: ---Dear Rumen Zapryanov

Thank you for shopping at apokalypsabg.org.
Please find below the information about the products you have ordered:

&#1040;&#1088;&#1090;.&#8470;: 101
Product Name: Заглавие
&#1050;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086;: 1
&#1062;&#1077;&#1085;&#1072;: BGN 16.00
&#1044;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;: BGN 6.00
&#1057;&#1091;&#1084;&#1072;: BGN 16.00

&#1040;&#1088;&#1090;.&#8470;: 102
Product Name: Заглавие
&#1050;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086;: 1
&#1062;&#1077;&#1085;&#1072;: BGN 12.00
&#1044;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;: BGN 6.00
&#1057;&#1091;&#1084;&#1072;: BGN 12.00

-------------------------------------
&#1052;&#1077;&#1078;&#1076;&#1080;&#1085;&#1077;&#1085; &#1089;&#1073;&#1086;&#1088;: BGN 28.00
&#1044;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;: BGN 12.00
-  0.0% &#1044;&#1072;&#1085;&#1098;&#1082;: BGN 0.00
-------------------------------------
-------------------------------------
&#1054;&#1073;&#1097;&#1086;: BGN 40.00
-------------------------------------

We will ship the order to the address below:

no
Rumen Zapryanov
busmanci, cyklama 2
-1520 Sofia
Sofia
--- End code ---

jacobi22:

--- Quote from: rumen on May 30, 2016, 04:13:17 PM ---I bought from the Bulgarian version, by definition it should use the Bulgarian file language. But in the e-mail I get the English version.

It is strange also that I choose "Method of payment" to be a "Cash on delivery" - I save the settings and when I enter again on the place, where is the method of payment is "Advance payment" see the pic's:

--- End quote ---

back at home from the doc - now step by step  ;-)

the language for the confirmation form and also for the confirmation emails are defined in view_confirmation.p hp in this part


--- Code: ---// Look for payment method language file
        if (LANGUAGE_LOADED) {
                include(WB_PATH.'/modules/bakery/payment_methods/'.$payment_method.'/languages/EN.php');
                if (file_exists(WB_PATH.'/modules/bakery/payment_methods/'.$payment_method.'/languages/'.LANGUAGE.'.php')) {
                        include(WB_PATH.'/modules/bakery/payment_methods/'.$payment_method.'/languages/'.LANGUAGE.'.php');
                }
        }
--- End code ---

it means: load as a basic language the english language file from the payment-method-folder
plus
if there is a file with a valid language code from the selected language on this (frontend-)page, load this file.

the last loaded definition from a language variable replace then the english variable. is one of the variable not defined in your used language, take the variable from the english file.

the english file is the main file and included all!!! language variables, in wb-core, in bakery main language file and also in the payment method.

So, for you:
- be sure, that u use the correct language code for the bulgarian file (BG.php)
- be sure, that you have a file with this name (BG.php) in every in your shop activated payment-method-language-folder
- be sure, that you have a translation in this! BG.php for every in the EN.php used language variable

some little helpers... but be carefull, if you work on the online project and not on a test-page

search in view_confirmation.p hp for this code, its nearly on the top. replace the EN in this line

--- Quote --- include(WB_PATH.'/modules/bakery/payment_methods/'.$payment_method.'/languages/EN.php');
--- End quote ---
with the BG for a test, so its load only the BG.php and everything must be come in your favorite language
visible only in the confirmation-mails
Dont forget to remove it after the test or it use the bulgarian language also on english pages (or better:) in the confirmation mail for a english speaker

if i look to your last post.... another simple tip.... 
if you are not sure about the chars in your mail, copy all this chars from your email, go to a WB-Page with a wysiwyg-Editor, switch to source-code and add there your text, then switch back to the normal editor view (preview) and you see a translation like this



it looks, that your bakery or your mailserver use htmlspecialchars to display the cyrillic chars. i did not found a function for that in the actual bakery version. bakery has a own phpmailer, so it has nothing to do with the wb-mailer

rumen:
I changed the language in view_confirmation.p hp and try to input new order.

I got error when I entered the names in Cyrillic:

rumen:
When I changed the names in Latin letters I got the order - done, but the confirmation is the same:


--- Code: ---Dear Rumen Zapryanov

Thank you for shopping at apokalypsabg.org.
Please find below the information about the products you have ordered:

&#1040;&#1088;&#1090;.&#8470;: 101
Product Name: Заглавие
&#1050;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086;: 1
&#1062;&#1077;&#1085;&#1072;: BGN 16.00
&#1044;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;: BGN 6.00
&#1057;&#1091;&#1084;&#1072;: BGN 16.00

&#1040;&#1088;&#1090;.&#8470;: 103
Product Name: Заглавие
&#1050;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086;: 1
&#1062;&#1077;&#1085;&#1072;: BGN 11.00
&#1044;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;: BGN 6.00
&#1057;&#1091;&#1084;&#1072;: BGN 11.00

-------------------------------------
&#1052;&#1077;&#1078;&#1076;&#1080;&#1085;&#1077;&#1085; &#1089;&#1073;&#1086;&#1088;: BGN 27.00
&#1044;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;: BGN 12.00
-  0.0% &#1044;&#1072;&#1085;&#1098;&#1082;: BGN 0.00
-------------------------------------
-------------------------------------
&#1054;&#1073;&#1097;&#1086;: BGN 39.00
-------------------------------------

We will ship the order to the address below:

Rumen Zapryanov
busmanci, cyklama 2
-1520 Sofia
Sofia
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version