Multiple Language support for ESBDevLib

One request we had from many customers was to be able to choose Language (ie the Language that the Resource Strings) were in from within an Application.

The Installer for ESBPCS for VCL allows a Language to be chosen and then it creates an appropriate include files and copies the Resources Strings (as Pas Files) into the main Source Directory – then Builds the various Packages. However – if you build the Library with English US and you have customers who are in the UK as well then you have to rebuild ESBPCS with a different Language and then rebuild your App.

The main area that has demand for this is for the measurement strings.


English International and English US are always up to date, as the first is the default (and what we use in-house) and we can easily maintain the latter. Carlos Tré has been working hard over the years maintaining the Brazilian Portuguese and just this month -=XARA=- has supplied Chinese Simplified (which will be included in ESBPCS for VCL v6.2.1 due in about a week).

Many of the other Languages supplied haven’t been updated in awhile – and when we don’t have a local language equivalent then English International is used – if you are willing to help us update strings or to add new language please let me know.

We experimented with multiple resource files – but customers we talked to (and we ourselves) like the concept of just a single Exe.

So for ESBDevLib, we have replaced our Resource Strings with Resource Classes that contain Dictionaries – so that a “string” is looked up for a given Language and if not found, then the string for English International is used. These Resource Classes are created when accessed through “global” routines or through Classes (like the various Measurement Conversion classes) that use them internally. So you can now have one button that pops up a Calculator that has English US hints, etc and another button that pops up a Calculator that has Chinese hints, etc…

More likely you will have a configuration area where the customer chooses what language – this is what we do in our very popular Unit Conversion Software – where we offer the choice of English International or English US.

In house, we are storing the strings and various details in a database, with an in-house Application that generates the various files – which also still keeps ESBPCS up-to-date:

Our Resource Manager

So many of the classes and non-visual components in ESBDevLib will have Language Properties – that default to the language chosen at install time.

About esbglenn

Software Developer working at our Family owned business, ESB Consultancy, which is located in Kalgoorlie-Boulder, in the Eastern Goldfields of Western Australia.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.