BACKUP ~Alcool/backup~
AUTHOR ~http://www.baldursgateworld.fr/lacouronne/les-pepites-de-cespenar/~

// Isaya: version information set here (using a new WeiDU feature)
// Version of the mod, appearing in the WeiDU.log
VERSION ~V0.14~

// If the readme file is missing in the language chosen for the installation (not provided by translator)
// use the English one
README ~alcool/Readme/readme-alcool_%LANGUAGE%.txt~ ~alcool/Readme/readme-alcool_english.txt~

// BG2EE TRA compatibility
ALWAYS
  
    //Copies tra files into the autotra-folder (to leave the originals untouched)
    DEFINE_ACTION_FUNCTION autotra_workaround BEGIN
      COPY ~alcool/Tra/francais~  ~alcool/Tra/autotra/%LANGUAGE%~
      COPY ~alcool/Tra/%LANGUAGE%~  ~alcool/Tra/autotra/%LANGUAGE%~
    END

    LAF autotra_workaround END


//  ACTION_DEFINE_ARRAY fl#noconvert BEGIN END

 ACTION_DEFINE_ARRAY fl#reload BEGIN setup-alcool END

    LAF HANDLE_CHARSETS
      INT_VAR
        infer_charsets = 1
      STR_VAR
        tra_path = EVAL ~alcool/Tra/autotra~
//        noconvert_array = fl#noconvert
        reload_array = fl#reload
 END
END

// AUTO_TRA tells WeiDU to use by default the TRA file having the same name as
// dialog or script being compiled in the Alcool/<language> directory,
// where <language> is the name of the language selected by the user (second word
// in the LANGUAGE definition below).
// This removes the need to use COMPILE-USING directive for the COMPILE action
// when the .d and .tra file have the same name
AUTO_TRA ~alcool/Tra/autotra/%s~


LANGUAGE ~Francais~
~francais~
~alcool/Tra/francais/setup-alcool.tra~

LANGUAGE ~English (by Lollorian)~
~english~
~alcool/Tra/english/setup-alcool.tra~

LANGUAGE ~Castellano (by ¿Quien si no?)~
~castellano~
~alcool/Tra/castellano/setup-alcool.tra~

LANGUAGE ~Russian (by Austin & AERIE Team)~
~russian~
~alcool/Tra/russian/setup-alcool.tra~

LANGUAGE ~German (by Niguno)~
~german~
~alcool/Tra/german/setup-alcool.tra~


// Main component
BEGIN @0
LABEL ~Mathrim_Cauthon-Alcool~
REQUIRE_PREDICATE GAME_IS ~soa tob bgt bg2ee eet~ @1

// Isaya : due to the AUTOTRA instruction, WeiDU will use the MCAlcool.tra file in the selected language
COMPILE ~alcool/mcalcool.D~
