Multi-language print formats

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

Check this:

Will be happy to help you implement if you create a pulll-request :smile:

Hi M. Mehta,

We will start working on this next week. We will also work on multi-language Item description.

Thank you

@lefebvre_bern Great. We will be happy to add your contribution - If you need help, just share your commits.

Hi @rmehta,

It’s been more than a week but we’re ready to begin working on this. :wink:

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

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?

@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.

Updated the GitHub Issue, you can add comments there.

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?

Again! Thank you very much!

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(),

Why not send a pull request?

Also please use lowercasing (description_table) in fieldnames, its a Python convention.

Hi,

Well I taught that pull request were for when I finish the modification?

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.

Hi I’ve create 2 pull request, the first one for ERPNEXT : https://github.com/frappe/erpnext/pull/3086
the second one for frappe : https://github.com/frappe/frappe/pull/1077

If you could tell me what you think about it, especially the change in get_item_details.py

1 Like

@chafor - let me look into this next week.

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.

@fblauer, as of now you will have to change the global language or make separate formats for different languages.