Skip to content

Latest commit

 

History

History
 
 

locexp

## Copyright (c) 1999-2006, International Business Machines Corporation and
## others. All Rights Reserved.

LOCALE EXPLORER  :  by Steven R. Loomis, IBM
-----------------------------------
2004-May-27  locALE management
  * merge script with language.  "en, ja, zh, zh-Hant, ..."
  * merge region with variant.  "AM, AM-REVISED, US, ..."

2004-Apr-03  URL redo. Support only a bare minimum of the old URLs.

 KEYWORD      EXAMPLE   MEANING

-------------------------------- Explored Locale
 l            en        Language
 s            Latn      Script
 r            US        Region
 v            ALAND     Variant

 currency     USD       keyword "currency"
 collation    phonebook kw "phonebook"
 calendar     japanese  kw "calendar"
 
 _            en_US     Full Explored Locale (Cookied)

-------------------------------- Display Locale
 d_l           sr        Display Locale
 d_s           Cyrl      Display Script
 d_r           YU        Display Region
 d_v                     Display variant
 d_           sr_YU     Full Display Locale (Cookied)

-------------------------------- Misc Settings
 tz      Europe/Malta   Time Zone (Cookied)
 lat     22             Latitude
 lon     -130           Longitude

-------------------------------- Transient
 x  col,cal,num,brk,ast,dat,src   Section
 sc       y               Set Cookies. Set to 'y' if a cookie was sent with the last request.   If  sc=y and no cookies show up, set sc=n.
 sc       n               No Cookies.  Passed through. Display an 'attempt cooky' page if n.   If cookie is set, display 'Remove Cookie'
 sc       r               Remove cookie and then set to 'n'.
 e        utf-8           Encoding.
--------------------------------- Sectional
NP_DBL    2.34444                 number
... others



TODO 8/15/2003 
  Sort
    * fix G7

  


-------

[ * NEW: see the section on HINDI/SYRIAC and TRANSLITERATION at the bottom ]

This is the source for the locale explorer CGI which is on IBM's
external website at:

    http:https://demo.icu-project.org/icu-bin/locexp

 The purpose of this CGI is to (1) make available the locale data for
viewing, and (2) show off the ICU.  Hopefully, it will also be an
interesting and useful sample.  Please let us know (via the newsgroup)
if this is useful or not, if you have any questions, or comments..

 The tools and routines were also built to support locale explorer
first, however we are continuing to try to make them more general
purpose.  If you see something you think should be part of the ICU,
by all means file a bug and explain what you want and how it can be
made better!

 Locale explorer isn't quite as much of a 'ready-to-go' application as
some of the others in icuapps.  Installing it takes some familliarity
with and a running web server.  


BUILDING
--------

 To build the locale explorer, first you must have the ICU built and
installed of course (see ../README).  


  Secondly, the uconv and usort
projects should be built and installed.   In short, your best bet is
to simply type 'make install' from the top level of icuapps.

 Please read Makefile.in for details on making 'Makefile.local'.

EXPERIMENTAL LOCALES
--------------------
   1). To get the experimental locales, first cvs update the 'locale' directory which is at
  the same level as 'icu' and 'icuapps.
   2). CD into the icu/source/data/locales directory
   3). Copy the data:   
              cp ../../../../locale/icu/experimental/*.txt .
   4). add the data to the reslocal file (assumes you don't already have a reslocal) 
         echo 'GENRB_SOURCE_LOCAL='`(cd  ../../../../locale/icu/experimental/ ; ls *.txt)` > reslocal.mk
   5). rebuild ICU


INSTALLING
----------

 After 'make install' is run in the locexp directory, the locale
explorer itself will be installed in PREFIX/bin and it's data will be
in the 'locexp' directory under the ICU's own installed data
directory. 

 If the binaries and data are left in these directories, then the
'locexp' program can simply be called directly as a CGI.  On one
server, it is installed this way: [apache syntax]

   # The prefix is /home/srl/II
   ScriptAlias /localeexplorer /home/srl/II/bin/locexp

  
 There are no .gif's, .html's or .jpg's to install anymore - they all live
 in the resource file.

DEBUGGING
--------- 

 There is also a script called 'testVars.sh' in the tools directory
that can aid in command-line debugging. See that script for more
information. 


HINDI - ASSYRIAN - TRANSLITERATION  [ALL BROKEN - dont' bother]
----------------------------------
To make 'fonted' and 'transliterated' work, go to '../xtradata/' and read
the README there.

'fonted' must be selected as a converter.

Transliterated forces stuff through US-ASCII [7 bit] but eventually
outputs utf-8.  [it will show up as 'utf-8' on the encoding list.]

Here are user side isntructions for installing Hindi support:
-----------------------------
     Go to the ITRANS site http:https://www.aczone.com/itrans/ and download
this file:  
         ftp:https://ftp.aczone.com/pub/itrans/itransfn.zip 

     Unzip the file. You should find the directory itrans5.2/lib/fonts/ 
     You should find files starting with 'xdvng.*' there. 
         Mac: 
              Drop 'xdvng.hqx' into Stuffit expander, or double click
it, or drop it into Netscape/IE -- you should get the file 
              xdvng.suit out of it. 
              Drop xdvng.suit into your System folder, and restart
your web browser.  

         Windows: 
              Open the Fonts control panel. You can either drag
xdvng.ttf into that control panel, or go to the file menu (in Fonts) 
              and pick Install, to install it. 
              Restart your web browser. 

         X-Windows 
              See the README and ../FONTS.SCALE files.. 
              Run 'mkfontdir .' and then 'xset fp+ `pwd`' and finally 'xset fp rehash'. 
              Restart your browser 

 [NOTE: hindi is broken, as of late 2000]

-------------------------------
-------------------------------

TODO LIST for LOCEXP: [X=done, ~=partially done]

 ~ see util/README for utility TODO's [mostly done]

 X coll rules under xliteration don't look right
      they come out as: \u03BC , \u039C

to summarize: [todo for LX besides whatyou mentioned below]

 X transliterate via latin-1 but transliterate TO utf-8 - simply change
the output converter.

 X Fix bug where single characters aren't transliterated

 X Try to make javascript pop windows to the top

 ~ Transliteration OFF may go to default CP or may remember the old one.
     (for now)

 X get xlit docs posted

 X rename 'g7' to 'multiple language sort demo' - add Swedish and 'bzt'
string, move to 'demo' section on main page. 


X - done
 Mark Davis typed the following on Feb 22, 2000 :
 > The text at the top of the help file should be more general. How about:
 > 
 > This file contains the help text for Locale Explorer, organized by topic.
 > If your question is not covered here, you can post your question on IBM's
 > unicode news group (link to
 > news:https://news.software.ibm.com/ibm.software.unicode). Please post any
 > comments or suggestions for improvement of this help file on the ICU bug
 > list (link to the bug database).

-----------
  -- lots of updates
    - initSortable needs to init only a part of the name. 

    - localize '>', ',' (list sep)

    - improve the 'default' pattern in the DTexplorer

    - better usort sample strings

    - add LANG and HTTP META tags - for saved documents
    - use cookies to hide the lang/encoding choice
      - have a 'no cookies' link (add a third PI path) if cookies are
        declined

   - handle shiftjis/korean/euc-jp escaping...
       backslash (U+005C) isn't available! do soemthing else.. use %'s or 
        something. maybe transliteration.


todo 1.6.0
 *  - add 'show all cnvs'
    - add 'show all label locales' [assume lx locales are a subset of icu locales]


===== CHANGES in 1.6:
 - converter list pared down to just MIME names [for now.. todo: show all]
 - several fixes to the way sample sorts are printed
 - 'change label' is shown in the target lang
 - changing converters/labels/translit is disabled in 'exploration' page
 - new localization: French
 - The experimental transliterators and locale data have not been put up on the   locale explorer page now.
 - simplified banner for locale explorer
 - MIME names are used and passed to the browser

=======
TODO, transliteration:
A couple of design points -  #1, want to do any-any transliteration, #2 need to put contexts into FSWF().
  steps:
   1. remove HTML from fswf'ed text, OR mark it somehow..
   2. make FSWF have a switch so that it can translit ..
   3. also, have some fcn so %U's can be transliterated... 
                (buffer pool mgmt) 

 Then, we could evne transliterate Latin-Cyrillic [ex].. because no HTML tags would be transliterated.. 

===========
J1047

The collation demo should be enhanced to make it more useful for outside people
to test our rules.

PHASE 1:

Add UI to set each of the attributes that can be set on the collator. These can
be pull-down lists. The contents should be:

Strength: default, primary-only, primary-secondary, primary-tertiary,
primary-quarternary, identical

Ignore Punctuation: default, on, off

Case first: default, upper, lower, off

Case level: default, on, off

Normalization mode: default, on, off

French collation: default, on, off

Note: these can be in a two or three column table (with invisible boundaries) to
take up less vertical space, and keep from pushing the main test area off the
bottom of the screen.


PHASE 2:

Add UI to set the locale directly. One pulldown for language, one for country,
one for variant. The contents of the country depends on the current language
showing. If none, the pulldown is grayed. Same goes for variant.


PHASE 3:

Add a window (like what Alan does for transliteration) that lets people edit
their own rules.