USE internationaliser;
/**
 * locales potentially used by this project by any bundle
 */
DROP TABLE IF EXISTS projectLocales;
CREATE TABLE projectLocales (
   /**
    * short 8-char name for project. All lower case
    */
   uniqueProjectID VARCHAR( 8 ) NOT NULL,
   /**
    * language of locale, 2-char abbreviation, lower case.
    */
   language CHAR ( 2 ) NOT NULL,
   /**
    * country of locale, 2-char abbreviation, all caps, possibly null.
    */
   country CHAR ( 2 ),
   /**
    * variant of locale, 3-char abbreviation, all caps, possibly null.
    */
   variant CHAR ( 2 ),
   /*
    * Locales are associated with an icon, but those icons are not stored in the database.
    * They live in resource files, under names like locale/en_CA.png or locale/sr_YU_CYR.png
    * If you use a locale for which no icon in defined, you just get a default icon.
    * Because the name can be generated from the language/country and variant, you would think we would
    * not  to store the name of the icon resource in the database. We store the name so several locales
    * can share the same icon.  We store just the middle part with out the lead locale/ or trailing.png
    * Icons are displayed with tooltip hoverhelp, so if you hover your mouse over them, they will tell you
    * the language, country and variant they represent, both the abbreviation and long form.
    */
    iconName VARCHAR( 30 ),
    /**
    * Justification codes upper case
    * L = left justified, like English, read left to right.
    * R = right jultified, like Hebrow, read right to left.
    */
   justification ENUM( 'L','R' ),
   /**
    * The name of the font to use for displaying this locale.
    * Ideally it will be preinstalled on all client machines.
    * However, some PostScript and TrueType fonts are suitable
    * for including as a resource.
    * They don't live in the database.
    * They are distributed via the same
    * mechanism icons are, as resources in jars on the path.
    * a pre-installed or built-in font might be named, for example "Dialog".
    * a resource font might be named font/AdobePiStd.otf for an opentype font,
    * or font/LucidaBrightRegular.ttf for an true type font.
    * Dialog by default.
    */
   font VARCHAR(30),
   /**
    * true : use antialiasing to make the displayed characters look sharper.
    * false : don't use antialiasing because this font does not support it,
    * or for some reason, looks worse.
    * By default true.
    */
   antiAlias BOOLEAN,
   /**
    * size in points of type used to render this locale, 8..15 usually 12
    */
   fontSize INTEGER,
   PRIMARY KEY( uniqueProjectID, language, country, variant ),
   FOREIGN KEY( uniqueProjectID ) REFERENCES projects( uniqueProjectID )
   );
