Uniface 9.4 Date Localisation

Author: tom_estes@htaoh.honda.com (Tom_Estes)

All,

I am facing an issue and need some guidance. We are in the process of localizing or application for Mexican users. We have successfully managed to migrate screen text to Spanish and store the translations in the database so that administrators can change the verbiage on the fly. We also control the language via the ASN so it is still a common code set.

Now this is where I have an issue. Our Mexican users would like to use a date format of 'DD/MM/YYYY'. We have gone back to the developer with this request and the developer states that it would require a recompile which would create another branch of the code set.

So the $64k question, can date preference be localized and controlled at ASN or INI level?

Thanks in advance!

 

4 Comments

  1. It (kind of) can.

    It depends on how it is currently set up in the program itself, but Uniface 9.4 introduces the $NLS_LOCALE assignment setting, which allows one to set the locale in the assignment file, and this has an effect on date and stuff settings (as long as they are not deliberately overwritten with a format in the model/template or widget.

    However, this comes in two flavours
    $NLS_LOCALE=en_GB - Set, for each assignment file and therefore roughly equivalent to $language
    and
    $NLS_LOCALE=system - Which reads the info from windows registry so one assignment file (should) work for all users in all countrys.

    However, I have three support logs outstanding with the Labs (for the last year or so) where using $NLS_LOCALE=system wrecks the system behaviour on both date entry and number conversions. So I would advise testing it really carefully.

    If your developer has specified a format in the templates for the widgets etc, they'd have to be replaced with DIS($NLS(......)) (See the manual), but one code line should then suffice (although it would require changes to every asn, not just the affected ones).

    Is anyone out there actually using $NLS_LOCALE? I tried, and had to write it all back out again due to the above logs....


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  2. We did this in a different way :)

    The  User has a language flag. This is customizeable for the user/admin. On login, the flag is loaded and so the system knows, how to handle the inputs (you could pass it to a global var or something like a session, Session IS preferred as also Services and Server pages will work with that).

    And if this flag isnt set, then take $language as default.

    A bit tricky but works well. We have this with spanish/english/german/whatever customers both in C/S and Web front end.

    -GHAN-

     


    Author: -GHAN- (hansen@ahp-gmbh.de)
  3. We also have something similar in our application (user record has an attribute language).


    Author: tandron (tatiana@ca.ibm.com)
  4. Hi,

    In the language setup you can specify the following things for each language:
    - Names and abbreviations of months
    - Names and abbreviations of days
    - Default date, datetime and time formats
    You can reach these in the IDF under Utilities > Deployment > Language Setups > Date-time properties

    If you have no access to a Development environment you should also be able to do these settings with the Deployment Environment (also known as the Uniface Runtime Manager or URMA) if I remember correctly.

    You can use $language in the asn file to specify the language.

    But all of this is pointless if your developer already applied a specific layout to your date fields...

    Theo Neeskens
    Solution Architect
    Compuware Uniface Services


    Author: Theo Neeskens (tneeskens@itblockz.nl)