WebsiteBaker Support (2.8.x) > Bakery Shop
How to fix laguage issue with e-mail confirmation
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:
Арт.№: 101
Product Name: Заглавие
Количество: 1
Цена: BGN 16.00
Доставка: BGN 6.00
Сума: BGN 16.00
Арт.№: 102
Product Name: Заглавие
Количество: 1
Цена: BGN 12.00
Доставка: BGN 6.00
Сума: BGN 12.00
-------------------------------------
Междинен сбор: BGN 28.00
Доставка: BGN 12.00
- 0.0% Данък: BGN 0.00
-------------------------------------
-------------------------------------
Общо: 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:
Арт.№: 101
Product Name: Заглавие
Количество: 1
Цена: BGN 16.00
Доставка: BGN 6.00
Сума: BGN 16.00
Арт.№: 103
Product Name: Заглавие
Количество: 1
Цена: BGN 11.00
Доставка: BGN 6.00
Сума: BGN 11.00
-------------------------------------
Междинен сбор: BGN 27.00
Доставка: BGN 12.00
- 0.0% Данък: BGN 0.00
-------------------------------------
-------------------------------------
Общо: 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