[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1621.0. "Language.. in V2's SM" by HANDVC::ASTONCHAN () Wed Oct 25 1989 00:24

	In DECW V2, there is a pulldown entry in the SM's Customization
	labelled "Language...".

	What will be done/updated if one selected an entry say French?

	Is it just a hook for the future XNLS implementation?
    
        Anything to do with IPW?

	Where can I find further description on this?

	Thanks in advance for any help.

	Regards.
    

T.RTitleUserPersonal
Name
DateLines
1621.1STAR::ORGOVANVince OrgovanMon Oct 30 1989 21:0021
    The "Language..." pulldown in the session manager causes a 
    property to be stored on the root window that contains the user's
    preferred language setting. The DECwindows V2 toolkit examines
    this property when XtInitialize is called, and redefines the
    logical names for:
    
    	SYS$LIBRARY
    	SYS$MESSAGE
    	SYS$HELP
    	SYS$EXAMPLES
    	DECW$SYSTEM_DEFAULTS
    
    so that these point to a language specific subdirectory before
    pointing the normal locations. If the French DW language variant
    kit has been installed, the French subdirectory would contain
    French translations, while the normal location contains the default
    U.S. English files.
    
    If a language variant kit for the user's selected language is not
    installed, the logical names are still redefined but since the
    subdirectory won't be found the user will get U.S. English files.
1621.2How to retrieve the Language resource?HANDVC::ASTONCHANMon Nov 20 1989 01:0815
    
    I looked into the SM's source coding and found that when a new 
    Language is set, the XrmPutStringResource() is called :
    
    > XrmPutStringResource(&xrmdb.xrmlist[i][j].name, value);
    
    How can I reference this resource in my application?  I need this
    information 'cause I need to have it as a switch to determine which
    Language specific coding should be executed.  Is xrmdb... visible to
    my application?
    
    Regards,
    
    Aston
    
1621.3details on the language resourceSTAR::BROUILLETTEMon Nov 20 1989 14:5341
    
    When your application starts up, XtInitialize executes code which gets
    your application UID file in the correct language.  I believe XNLS will
    provide utility routines which applications can call to get the current
    culture that the application is using.   However, they are not part of
    V2 DECwindows.
    
    If you can't wait for XNLS, then you can still get the current
    language.  The language which the user selects is stored in the
    resource property on the root window.   This property is merged into
    your application xrm database when the application starts. To get the
    application database, use the intrinsics routine XtDatabase.  Then use
    XrmGetResource to get the language resource.  The name of the resource
    is xnlLanguage.   The value which will be returned is one of the
    following for VMS 5.3 - DECwindows V2.
    
                                nl_NL       /* Dutch */
                                en_GB       /* GB English */
                                en_US       /* US English */
                                fr_FR       /* French */
                                fr_CA       /* French-Canadian */
                                de_DE       /* German */
                                it_IT       /* Italian */
                                no_NO       /* Norwegian*/
                                es_ES       /* Spanish */
                                sv_SE       /* Swedish */
                                fr_CH       /* Swiss-french*/
                                de_CH       /* Swiss-German*/
                                it_CH        /* Swiss-Italian */
    
    So, if the user selected French, the value of the xnlLanguage resource
    would be fr_FR.  If you want your application to respond dynamically to
    language switches by the user, you will need to set a property notify
    on the RESOURCE_MANAGER property.  The property is updated by the
    session manager when the user changes workstation customization.  Then
    your code could determine if the xnlLanguage value had been changed.
    
    
    Additional languages have been added for the VMS release which provides
    the XNLS utilities.  So, be aware that the list will grow in the
    future.
1621.4SARAH::WOLFEThat's a 511 ma'm. Failing to yield to good tasteMon Nov 20 1989 19:525
    Just out of curiosity, how is this all done on an Ultrix system (i.e.
    redefinig the logicals to automagically make it all work). Environment
    variables?
    
    			pete
1621.5Property vs resourceHANDVC::ASTONCHANTue Nov 21 1989 23:4010
    
    Re .3
    
    I finally got it!  Thanks.
    
    Can anyone tell me what is the difference between a property and a
    resource?
    
    Thanks.
    
1621.6a user's viewSICVAX::GRAHAMif ya want home cookin, stay homeSat Nov 25 1989 00:4146
    RE .5
    
    >Can anyone tell me what is the difference between a property and a
    >resource?
    
    Since the real gurus have not had time to repond to this question,
    I will snipe at it ;-)
    
    A PROPERTY is an arbitrary collection of data that can be associated
    with a window..whereas a RESOURCE is a named piece of data in a widget
    that can be set by a program and in some cases by a user.
    
    To communicate with a window manager (eg Mwm), a  client can place 
    PROPERTIES on a top-level window.  A window manager will use the
    information to arbitrate:
    - how to handle a client's keyboard focus.
    - how to decorate the window.
    - what messages the client is interested in.
    
    PROPERTIES can either be standard (ICCCM) or special....can
    I say dxwm (DECwindows-specific) ? ;^)
    Examples of PROPERTIES are WM_NAME (string that identifies window..
    e.g. in title bar..usually set by first argument in XtInitialize,
    or WM_PROTOCOLS ( the communications protocols that a WM understands).
    Normally includes a set of ICCCM protocols.
    
    Under X, when application starts up, the toolkit initialization
    routines are able to construct a RESOURCE database from 5 sources.
    
    - An application-specific class RESOURCE file:
      /usr/lib/X11/app-defaults/class (my U*IX bias is showing)
    - Application-specific user resource file"
      XAPPLRESDIR/class
    - User resource file:
      RESOURCE_MANAGER OR .Xdefaults
    - Per host user resource file:
      XEnvironment OR .Xdefaults-host
    - Application command line:
      -xrm option on command line.
    
    As an example, a Motif label widget's RESOURCEs may include:
    - A character string for its label.
    - A font with which to draw the label.
    - Foreground and background colors.
    
    Kris..
1621.7DGPBOXNARD::HAYNESCharles HaynesMon Nov 27 1989 03:094
    Hey Kris, you sound like a "guru" to me. What does it take to become an
    official "guru"? Do we need a DECwindows guru promotion board?
    
    	-- Charles (senior DECwindows guru :->)
1621.8Nah...MELTIN::dickGvriel::SchoellerMon Nov 27 1989 12:063
If we make it official, it will get all messed up.

Dick (associate DECwindows guru  8^{)