Simplicty and flexibility!


How to: Create your own SpeelWeekday() and yes/no for language support

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

How to: Create your own SpeelWeekday() and yes/no for language support

Download Sample

The main problem with using an English version of DataEase is things like Spell functions and yes/no. These are functions that a lot of users have grown fond of and want to use but it doesn't look nice when Weekdays are spelt in English in France, Norway, Germany etc.

Same goes for Yes/No.

The latter is very easy to fix, simply use a choice field instead. This way the application will travel as well since the translation of Yes/No to Ja/Nein or Oui/Non wont affect it.

The second one is Weekday() or rather SpellWeekday(). Weekday only give you the day of the week from 1 to 7, while SpellWeekday() give you the day in clear language for the number 1 to 7.... do we see an opportunity to play with it here?

Yes, definitely. Weekday only give us a number so that is "international" so we simply have to find a way to interpret that into the correct spelling.

And that is simpler than you think. Choices are really stored as numbers, so by simply key the days in a choice field in the correct order and insert Weekday(etc) in the derivation we are there.

If you look in the attached sample you will see how to add different languages in one field etc, by simple arithmetic.

This will do for today, it is just meant to set your mind off so you start thinking down new roads rather than constantly visiting the same places.


Written by DataEase 30/09/14 at 22:25:27 Dataease [{8}]FIVE