Hi,
Because of the bilingual nature of my country, we need to be able to print quotes, invoices, etc. in the customer’s or provider’s language. I would like to add a default language to a customer profile and generate print formats based on that language. What would be the best way to implement multi-language print formats?
Thank you
Bernard
rmehta
October 29, 2014, 9:24am
2
Check this:
https://github.com/frappe/frappe/issues/898
Will be happy to help you implement if you create a pulll-request
Hi M. Mehta,
We will start working on this next week. We will also work on multi-language Item description.
Thank you
rmehta
November 8, 2014, 11:08am
4
@lefebvre_bern Great. We will be happy to add your contribution - If you need help, just share your commits.
chafor
March 16, 2015, 3:21pm
5
Hi @rmehta ,
It’s been more than a week but we’re ready to begin working on this.
Do you think it could be better to add a new DocType call language. (Field could be : Name, Abbreviation, etc)
So we could link the language to the customer and the print format?
Thank you
chafor
March 16, 2015, 3:35pm
6
And also, if you want to add our contribution to the Erp Next main branch what module would you like us to add the new DocType? Core?
Because from what I see you use a Select in the User Doctype. So maybe something that could be use everywhere in ERP Next could be useful?
rmehta
March 17, 2015, 5:14am
7
@chafor , awesome thanks!
Best to make a quick design proposal as a GitHub Issue. Yes Language seems like a good DocType to create. User, Customer, Supplier, Contact, Lead, Newsletter, Web Page, Blog Post, all can have it… maybe we can start plugging
And a separate table for Item Description.
rmehta
March 17, 2015, 5:16am
8
Updated the GitHub Issue, you can add comments there.
chafor
March 30, 2015, 4:57pm
9
I add the an item description Doctype which contain two field (Language, Description). Now I want to modify the the search Item function of Sales Order Item in order to fill the description field with the correct description. (The one that match the customer Language field.) Where do I need to go in order to do that?
chafor
March 31, 2015, 1:45pm
11
Again! Thank you very much!
chafor
April 1, 2015, 7:42pm
12
Hi,
Could I ask you @rmehta to look at the modif I try to make? Here is the code :
# Modif CAF
argsCustomer = {
doctype: "Customer",
name: args.customer
}
customerData = frappe.client.get(argsCustomer)
translate_description = ""
if item.Description_Table[0].Language == customerData.customer_language:
translate_description = item.Description_Table[0].Description
if item.Description_Table[1].Language == customerData.customer_language:
translate_description = item.Description_Table[1].Description
if item.Description_Table[2].Language == customerData.customer_language:
translate_description = item.Description_Table[2].Description
if item.Description_Table[3].Language == customerData.customer_language:
translate_description = item.Description_Table[3].Description
# Fin modif caf
out = frappe._dict({
"item_code": item.name,
"item_name": item.item_name,
#"description": cstr(item.description_html).strip() or cstr(item.description).strip(),
"description": cstr(item.description_html).strip() or cstr(translate_description).strip(),
rmehta
April 2, 2015, 7:05am
13
Why not send a pull request?
Also please use lowercasing (description_table
) in fieldnames, its a Python convention.
chafor
April 2, 2015, 1:21pm
14
Hi,
Well I taught that pull request were for when I finish the modification?
rmehta
April 3, 2015, 12:37am
15
You can start the pull request. It will be accepted only when its complete! Otherwise its hard to find out what files you have changed.
chafor
April 9, 2015, 3:25pm
16
Hi I’ve create 2 pull request, the first one for ERPNEXT : Modif for multiple print language by chafor · Pull Request #3086 · frappe/erpnext · GitHub
the second one for frappe : Multi language print format by chafor · Pull Request #1077 · frappe/frappe · GitHub
If you could tell me what you think about it, especially the change in get_item_details.py
1 Like
rmehta
April 12, 2015, 4:35pm
17
@chafor - let me look into this next week.
chafor
April 13, 2015, 12:21pm
18
Thank you! I’ll continue trying to make it work from my side!
This will be a great feature for us when it is finished. In the mean time, is it possible to simply change the headings on the invoice to make them bilingual, or french? Is this possible in the SAAS version? I can’t seem to figure out how to do this.
rmehta
April 23, 2015, 6:06am
20
@fblauer , as of now you will have to change the global language or make separate formats for different languages.