Translations in POS

Good morning,

I have an instance of ERPNext and I want to do some custom translations for the receipts. For standard print format, everything works great - I can just do {{ _(“my text to translate”,“language code”) }}. However, the POS uses JS print format. I have tried using the double underscore “__(“my text”,“mylang”)”, but that doens’t seem to work. It always returns the input text. I notice here that JS print formats are depreciated.

I checked under POS Profile to see if I could select a different print format, but it seems to only allow me to select “JS” print formats.

Any guidance on how to do translations on POS receipts would be great!


P.S. This issue may be related, but I don’t think the fix applies.

P.S. I need to have two languages on a single receipt, so it’s important that I can specify the target string when translating i.e. _(“text”,“es”) instead of _(“text”).

@rohit_w is the person who design both offline POS and custom translation. Can you please help on this?

Currently __(“”) function don’t work for custom language code and it’s only working for the language you have set for your user. Can you please make github issue?

Issue created: Multi Language Translation Support in POS · Issue #14029 · frappe/erpnext · GitHub

As a work around, is there a way (maybe via a custom script) to make the POS use server side print formats since those already support targeted translation?

@rohit_w Could you tell me where I can find __(“”) function In JavaScript?