Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!bionet!agate!ucbvax!osf.org!dbrooks From: dbrooks@osf.org Newsgroups: comp.windows.x.motif Subject: Re: The LANG environment variable Message-ID: <9103221850.AA20636@osf.osf.org> Date: 22 Mar 91 18:50:44 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 45 > > Hello. I have what I think is a quick question concerning the > > LANG environment variable. How does this variable get set and > > how is it used by Motif? I tried to RTFM but I didn't know > > which FM to R. Thanks. > Hopefully this will work better at 1.2. We shall see. The LANG variable > is an X/Open specified environment variable. The user sets it to a value > indicating the language that they wish to use. Then certain tools (the > X/Open Message Catalog being one) load the appropriate text files using that > information. I believe that X11R5 will use it to load the resource files, > for instance. X11R4 does. To paraphrase section 2.2 of the Intrinsics C Language interface: magic is used to look for a resource {name|Class}.XnlLanguage; if that fails, the value of LANG is used... which is called "%L", and split by the semantics language[_territory][.codeset], as described by Kee, into parts called %l, %t, %c... which is used by XtResolvePathname, which can also consult XFILESEARCHPATH, which will often mention %L or %l (ibid, 11.11)... which is used to look up the application-specific per-user resource file using XUSERFILESEARCHPATH (which can use %L, %l, %t, %c), which defaults to something involving XAPPLRESDIR, %L and %l, which, after a good strong cup of coffee, defaults to something involving $HOME, %L and %l... and is also used by MrmOpenHierarchy, which in the absence of UIDPATH uses a path again involviong %L and %l (Motif PRM, MrmOpenHierarchy)... and is also used by XmGetPixmap, which in the absence of XBMLANGPATH again has a default involving %L and %l. (ibid, XmGetPixmap). Aren't you glad you asked. Actually, all this means is that if you set LANG appropriately, and have subdirectories named by your locale, it all works neatly. > Incidently, if someone at OSF can speak on what is going to happen here at 1.2 > I'd appreciate it... Sorry. It's still not for public consumption, but you may be able to bribe a member. Compatibility considerations would suggest the above scheme would still work. David Brooks Systems Engineering Open Software Foundation