Locale customization

Is there any attempt to add country based locale customization tools to Frappe?

In case it is already available, can you please guide me where it is?

1 Like

Which country you are specifically talking about?

Well, I am working on a utility app, so I would add locale to different countries over time.

To start with, I am interested in Kuwait locale settings, specially Address fields. While translation would represent the locale, using en wouldn’t do.

1 Like

There is so much scope if you do this.
There are two types of country-specific features:-

  1. Text & Locale, Country Specific Masters and its data. (eg:- Holidays , already added now)
  2. Compliance level Utilities. (Mostly Related to Accounting, Taxation, HR etc.)

Check out Address Template. You can use Jinja to build a universal template, or different ones per country.

Usually this would be done with a separate app for each country.

2 Likes

Exactly! I believe this is the need of the hour.

Thanks guys for the headsup.

I actually have two apps. One I called futilitap (Frappe Utilities App) which adds city, county, state tables and does necessary Property Setter mods. My second custom app is ERPNext_KWT which would have local settings.

My approach was concering locale, if it would accomodate administrative divisions in the address for each country. e.g. ‘state’ field label would actually be based on country locale so in USA it would be State, but in Canada it would be Province and so on. Maybe this is not what locale is about, you guys would be more experienced with that. In Kuwait the equivalant would be Governorate.

Right now I am testing if the country is Kuwait then the label of the field would be set to Governorate.

As far as Compliance level, I think KWT would only require HR so far.

My second custom app is ERPNext_KWT which would have local settings.

Regarding translation: What is the format of Context field if anyone is familiar with that? Does it accept dot notation from module to field? e.g. address.city ?

I used that for display. But I am interested in the labels for data entry of the user. I am getting mixed feed back from possible users if I should stick with Address Line 1, and 2 or use detailed fields accomidating local norms: Block, Street, Lane, Avenue, House, Bldg Name, etc and concat those into Address Line 1, and 2.

One suggestion was to use the Address Line 1, and 2 while using >> as seperator to avoid mixing with CSV , seperator. I believe the > character is valid seperator for international passport identification serial. So, to avoid further modifications of the default setup of Address in Frappe I might resort to that.

Thanks guys for your feedback and suggestions.

Definitely much easier to stick with the standard. It takes some time getting used to, but it’s really flexible to accommodate all kinds of address schemes.

Comma as a separator should not be an issue. It will be escaped in CSV export.

Context does not have a specific format. The context in the translation has to match the context parameter that is passed to the translation function, if any.

2 Likes