<?php
// Get languages
$languages["af_NA"] = "Afrikaans (Namibia)";
$languages["af_ZA"] = "Afrikaans (South Africa)";
$languages["af"] = "Afrikaans";
$languages["ak_GH"] = "Akan (Ghana)";
$languages["ak"] = "Akan";
$languages["sq_AL"] = "Albanian (Albania)";
$languages["sq"] = "Albanian";
$languages["am_ET"] = "Amharic (Ethiopia)";
$languages["am"] = "Amharic";
$languages["ar_DZ"] = "Arabic (Algeria)";
$languages["ar_BH"] = "Arabic (Bahrain)";
$languages["ar_EG"] = "Arabic (Egypt)";
$languages["ar_IQ"] = "Arabic (Iraq)";
$languages["ar_JO"] = "Arabic (Jordan)";
$languages["ar_KW"] = "Arabic (Kuwait)";
$languages["ar_LB"] = "Arabic (Lebanon)";
$languages["ar_LY"] = "Arabic (Libya)";
$languages["ar_MA"] = "Arabic (Morocco)";
$languages["ar_OM"] = "Arabic (Oman)";
$languages["ar_QA"] = "Arabic (Qatar)";
$languages["ar_SA"] = "Arabic (Saudi Arabia)";
$languages["ar_SD"] = "Arabic (Sudan)";
$languages["ar_SY"] = "Arabic (Syria)";
$languages["ar_TN"] = "Arabic (Tunisia)";
$languages["ar_AE"] = "Arabic (United Arab Emirates)";
$languages["ar_YE"] = "Arabic (Yemen)";
$languages["ar"] = "Arabic";
$languages["hy_AM"] = "Armenian (Armenia)";
$languages["hy"] = "Armenian";
$languages["as_IN"] = "Assamese (India)";
$languages["as"] = "Assamese";
$languages["asa_TZ"] = "Asu (Tanzania)";
$languages["asa"] = "Asu";
$languages["az_Cyrl"] = "Azerbaijani (Cyrillic)";
$languages["az_Cyrl_AZ"] = "Azerbaijani (Cyrillic, Azerbaijan)";
$languages["az_Latn"] = "Azerbaijani (Latin)";
$languages["az_Latn_AZ"] = "Azerbaijani (Latin, Azerbaijan)";
$languages["az"] = "Azerbaijani";
$languages["bm_ML"] = "Bambara (Mali)";
$languages["bm"] = "Bambara";
$languages["eu_ES"] = "Basque (Spain)";
$languages["eu"] = "Basque";
$languages["be_BY"] = "Belarusian (Belarus)";
$languages["be"] = "Belarusian";
$languages["bem_ZM"] = "Bemba (Zambia)";
$languages["bem"] = "Bemba";
$languages["bez_TZ"] = "Bena (Tanzania)";
$languages["bez"] = "Bena";
$languages["bn_BD"] = "Bengali (Bangladesh)";
$languages["bn_IN"] = "Bengali (India)";
$languages["bn"] = "Bengali";
$languages["bs_BA"] = "Bosnian (Bosnia and Herzegovina)";
$languages["bs"] = "Bosnian";
$languages["bg_BG"] = "Bulgarian (Bulgaria)";
$languages["bg"] = "Bulgarian";
$languages["my_MM"] = "Burmese (Myanmar [Burma])";
$languages["my"] = "Burmese";
$languages["ca_ES"] = "Catalan (Spain)";
$languages["ca"] = "Catalan";
$languages["tzm_Latn"] = "Central Morocco Tamazight (Latin)";
$languages["tzm_Latn_MA"] = "Central Morocco Tamazight (Latin, Morocco)";
$languages["tzm"] = "Central Morocco Tamazight";
$languages["chr_US"] = "Cherokee (United States)";
$languages["chr"] = "Cherokee";
$languages["cgg_UG"] = "Chiga (Uganda)";
$languages["cgg"] = "Chiga";
$languages["zh_Hans"] = "Chinese (Simplified Han)";
$languages["zh_Hans_CN"] = "Chinese (Simplified Han, China)";
$languages["zh_Hans_HK"] = "Chinese (Simplified Han, Hong Kong SAR China)";
$languages["zh_Hans_MO"] = "Chinese (Simplified Han, Macau SAR China)";
$languages["zh_Hans_SG"] = "Chinese (Simplified Han, Singapore)";
$languages["zh_Hant"] = "Chinese (Traditional Han)";
$languages["zh_Hant_HK"] = "Chinese (Traditional Han, Hong Kong SAR China)";
$languages["zh_Hant_MO"] = "Chinese (Traditional Han, Macau SAR China)";
$languages["zh_Hant_TW"] = "Chinese (Traditional Han, Taiwan)";
$languages["zh"] = "Chinese";
$languages["kw_GB"] = "Cornish (United Kingdom)";
$languages["kw"] = "Cornish";
$languages["hr_HR"] = "Croatian (Croatia)";
$languages["hr"] = "Croatian";
$languages["cs_CZ"] = "Czech (Czech Republic)";
$languages["cs"] = "Czech";
$languages["da_DK"] = "Danish (Denmark)";
$languages["da"] = "Danish";
$languages["nl_BE"] = "Dutch (Belgium)";
$languages["nl_NL"] = "Dutch (Netherlands)";
$languages["nl"] = "Dutch";
$languages["ebu_KE"] = "Embu (Kenya)";
$languages["ebu"] = "Embu";
$languages["en_AS"] = "English (American Samoa)";
$languages["en_AU"] = "English (Australia)";
$languages["en_BE"] = "English (Belgium)";
$languages["en_BZ"] = "English (Belize)";
$languages["en_BW"] = "English (Botswana)";
$languages["en_CA"] = "English (Canada)";
$languages["en_GU"] = "English (Guam)";
$languages["en_HK"] = "English (Hong Kong SAR China)";
$languages["en_IN"] = "English (India)";
$languages["en_IE"] = "English (Ireland)";
$languages["en_JM"] = "English (Jamaica)";
$languages["en_MT"] = "English (Malta)";
$languages["en_MH"] = "English (Marshall Islands)";
$languages["en_MU"] = "English (Mauritius)";
$languages["en_NA"] = "English (Namibia)";
$languages["en_NZ"] = "English (New Zealand)";
$languages["en_MP"] = "English (Northern Mariana Islands)";
$languages["en_PK"] = "English (Pakistan)";
$languages["en_PH"] = "English (Philippines)";
$languages["en_SG"] = "English (Singapore)";
$languages["en_ZA"] = "English (South Africa)";
$languages["en_TT"] = "English (Trinidad and Tobago)";
$languages["en_UM"] = "English (U.S. Minor Outlying Islands)";
$languages["en_VI"] = "English (U.S. Virgin Islands)";
$languages["en_GB"] = "English (United Kingdom)";
$languages["en_US"] = "English (United States)";
$languages["en_ZW"] = "English (Zimbabwe)";
$languages["en"] = "English";
$languages["eo"] = "Esperanto";
$languages["et_EE"] = "Estonian (Estonia)";
$languages["et"] = "Estonian";
$languages["ee_GH"] = "Ewe (Ghana)";
$languages["ee_TG"] = "Ewe (Togo)";
$languages["ee"] = "Ewe";
$languages["fo_FO"] = "Faroese (Faroe Islands)";
$languages["fo"] = "Faroese";
$languages["fil_PH"] = "Filipino (Philippines)";
$languages["fil"] = "Filipino";
$languages["fi_FI"] = "Finnish (Finland)";
$languages["fi"] = "Finnish";
$languages["fr_BE"] = "French (Belgium)";
$languages["fr_BJ"] = "French (Benin)";
$languages["fr_BF"] = "French (Burkina Faso)";
$languages["fr_BI"] = "French (Burundi)";
$languages["fr_CM"] = "French (Cameroon)";
$languages["fr_CA"] = "French (Canada)";
$languages["fr_CF"] = "French (Central African Republic)";
$languages["fr_TD"] = "French (Chad)";
$languages["fr_KM"] = "French (Comoros)";
$languages["fr_CG"] = "French (Congo - Brazzaville)";
$languages["fr_CD"] = "French (Congo - Kinshasa)";
$languages["fr_CI"] = "French (Côte d’Ivoire)";
$languages["fr_DJ"] = "French (Djibouti)";
$languages["fr_GQ"] = "French (Equatorial Guinea)";
$languages["fr_FR"] = "French (France)";
$languages["fr_GA"] = "French (Gabon)";
$languages["fr_GP"] = "French (Guadeloupe)";
$languages["fr_GN"] = "French (Guinea)";
$languages["fr_LU"] = "French (Luxembourg)";
$languages["fr_MG"] = "French (Madagascar)";
$languages["fr_ML"] = "French (Mali)";
$languages["fr_MQ"] = "French (Martinique)";
$languages["fr_MC"] = "French (Monaco)";
$languages["fr_NE"] = "French (Niger)";
$languages["fr_RW"] = "French (Rwanda)";
$languages["fr_RE"] = "French (Réunion)";
$languages["fr_BL"] = "French (Saint Barthélemy)";
$languages["fr_MF"] = "French (Saint Martin)";
$languages["fr_SN"] = "French (Senegal)";
$languages["fr_CH"] = "French (Switzerland)";
$languages["fr_TG"] = "French (Togo)";
$languages["fr"] = "French";
$languages["ff_SN"] = "Fulah (Senegal)";
$languages["ff"] = "Fulah";
$languages["gl_ES"] = "Galician (Spain)";
$languages["gl"] = "Galician";
$languages["lg_UG"] = "Ganda (Uganda)";
$languages["lg"] = "Ganda";
$languages["ka_GE"] = "Georgian (Georgia)";
$languages["ka"] = "Georgian";
$languages["de_AT"] = "German (Austria)";
$languages["de_BE"] = "German (Belgium)";
$languages["de_DE"] = "German (Germany)";
$languages["de_LI"] = "German (Liechtenstein)";
$languages["de_LU"] = "German (Luxembourg)";
$languages["de_CH"] = "German (Switzerland)";
$languages["de"] = "German";
$languages["el_CY"] = "Greek (Cyprus)";
$languages["el_GR"] = "Greek (Greece)";
$languages["el"] = "Greek";
$languages["gu_IN"] = "Gujarati (India)";
$languages["gu"] = "Gujarati";
$languages["guz_KE"] = "Gusii (Kenya)";
$languages["guz"] = "Gusii";
$languages["ha_Latn"] = "Hausa (Latin)";
$languages["ha_Latn_GH"] = "Hausa (Latin, Ghana)";
$languages["ha_Latn_NE"] = "Hausa (Latin, Niger)";
$languages["ha_Latn_NG"] = "Hausa (Latin, Nigeria)";
$languages["ha"] = "Hausa";
$languages["haw_US"] = "Hawaiian (United States)";
$languages["haw"] = "Hawaiian";
$languages["he_IL"] = "Hebrew (Israel)";
$languages["he"] = "Hebrew";
$languages["hi_IN"] = "Hindi (India)";
$languages["hi"] = "Hindi";
$languages["hu_HU"] = "Hungarian (Hungary)";
$languages["hu"] = "Hungarian";
$languages["is_IS"] = "Icelandic (Iceland)";
$languages["is"] = "Icelandic";
$languages["ig_NG"] = "Igbo (Nigeria)";
$languages["ig"] = "Igbo";
$languages["id_ID"] = "Indonesian (Indonesia)";
$languages["id"] = "Indonesian";
$languages["ga_IE"] = "Irish (Ireland)";
$languages["ga"] = "Irish";
$languages["it_IT"] = "Italian (Italy)";
$languages["it_CH"] = "Italian (Switzerland)";
$languages["it"] = "Italian";
$languages["ja_JP"] = "Japanese (Japan)";
$languages["ja"] = "Japanese";
$languages["kea_CV"] = "Kabuverdianu (Cape Verde)";
$languages["kea"] = "Kabuverdianu";
$languages["kab_DZ"] = "Kabyle (Algeria)";
$languages["kab"] = "Kabyle";
$languages["kl_GL"] = "Kalaallisut (Greenland)";
$languages["kl"] = "Kalaallisut";
$languages["kln_KE"] = "Kalenjin (Kenya)";
$languages["kln"] = "Kalenjin";
$languages["kam_KE"] = "Kamba (Kenya)";
$languages["kam"] = "Kamba";
$languages["kn_IN"] = "Kannada (India)";
$languages["kn"] = "Kannada";
$languages["kk_Cyrl"] = "Kazakh (Cyrillic)";
$languages["kk_Cyrl_KZ"] = "Kazakh (Cyrillic, Kazakhstan)";
$languages["kk"] = "Kazakh";
$languages["km_KH"] = "Khmer (Cambodia)";
$languages["km"] = "Khmer";
$languages["ki_KE"] = "Kikuyu (Kenya)";
$languages["ki"] = "Kikuyu";
$languages["rw_RW"] = "Kinyarwanda (Rwanda)";
$languages["rw"] = "Kinyarwanda";
$languages["kok_IN"] = "Konkani (India)";
$languages["kok"] = "Konkani";
$languages["ko_KR"] = "Korean (South Korea)";
$languages["ko"] = "Korean";
$languages["khq_ML"] = "Koyra Chiini (Mali)";
$languages["khq"] = "Koyra Chiini";
$languages["ses_ML"] = "Koyraboro Senni (Mali)";
$languages["ses"] = "Koyraboro Senni";
$languages["lag_TZ"] = "Langi (Tanzania)";
$languages["lag"] = "Langi";
$languages["lv_LV"] = "Latvian (Latvia)";
$languages["lv"] = "Latvian";
$languages["lt_LT"] = "Lithuanian (Lithuania)";
$languages["lt"] = "Lithuanian";
$languages["luo_KE"] = "Luo (Kenya)";
$languages["luo"] = "Luo";
$languages["luy_KE"] = "Luyia (Kenya)";
$languages["luy"] = "Luyia";
$languages["mk_MK"] = "Macedonian (Macedonia)";
$languages["mk"] = "Macedonian";
$languages["jmc_TZ"] = "Machame (Tanzania)";
$languages["jmc"] = "Machame";
$languages["kde_TZ"] = "Makonde (Tanzania)";
$languages["kde"] = "Makonde";
$languages["mg_MG"] = "Malagasy (Madagascar)";
$languages["mg"] = "Malagasy";
$languages["ms_BN"] = "Malay (Brunei)";
$languages["ms_MY"] = "Malay (Malaysia)";
$languages["ms"] = "Malay";
$languages["ml_IN"] = "Malayalam (India)";
$languages["ml"] = "Malayalam";
$languages["mt_MT"] = "Maltese (Malta)";
$languages["mt"] = "Maltese";
$languages["gv_GB"] = "Manx (United Kingdom)";
$languages["gv"] = "Manx";
$languages["mr_IN"] = "Marathi (India)";
$languages["mr"] = "Marathi";
$languages["mas_KE"] = "Masai (Kenya)";
$languages["mas_TZ"] = "Masai (Tanzania)";
$languages["mas"] = "Masai";
$languages["mer_KE"] = "Meru (Kenya)";
$languages["mer"] = "Meru";
$languages["mfe_MU"] = "Morisyen (Mauritius)";
$languages["mfe"] = "Morisyen";
$languages["naq_NA"] = "Nama (Namibia)";
$languages["naq"] = "Nama";
$languages["ne_IN"] = "Nepali (India)";
$languages["ne_NP"] = "Nepali (Nepal)";
$languages["ne"] = "Nepali";
$languages["nd_ZW"] = "North Ndebele (Zimbabwe)";
$languages["nd"] = "North Ndebele";
$languages["nb_NO"] = "Norwegian Bokmål (Norway)";
$languages["nb"] = "Norwegian Bokmål";
$languages["nn_NO"] = "Norwegian Nynorsk (Norway)";
$languages["nn"] = "Norwegian Nynorsk";
$languages["nyn_UG"] = "Nyankole (Uganda)";
$languages["nyn"] = "Nyankole";
$languages["or_IN"] = "Oriya (India)";
$languages["or"] = "Oriya";
$languages["om_ET"] = "Oromo (Ethiopia)";
$languages["om_KE"] = "Oromo (Kenya)";
$languages["om"] = "Oromo";
$languages["ps_AF"] = "Pashto (Afghanistan)";
$languages["ps"] = "Pashto";
$languages["fa_AF"] = "Persian (Afghanistan)";
$languages["fa_IR"] = "Persian (Iran)";
$languages["fa"] = "Persian";
$languages["pl_PL"] = "Polish (Poland)";
$languages["pl"] = "Polish";
$languages["pt_BR"] = "Portuguese (Brazil)";
$languages["pt_GW"] = "Portuguese (Guinea-Bissau)";
$languages["pt_MZ"] = "Portuguese (Mozambique)";
$languages["pt_PT"] = "Portuguese (Portugal)";
$languages["pt"] = "Portuguese";
$languages["pa_Arab"] = "Punjabi (Arabic)";
$languages["pa_Arab_PK"] = "Punjabi (Arabic, Pakistan)";
$languages["pa_Guru"] = "Punjabi (Gurmukhi)";
$languages["pa_Guru_IN"] = "Punjabi (Gurmukhi, India)";
$languages["pa"] = "Punjabi";
$languages["ro_MD"] = "Romanian (Moldova)";
$languages["ro_RO"] = "Romanian (Romania)";
$languages["ro"] = "Romanian";
$languages["rm_CH"] = "Romansh (Switzerland)";
$languages["rm"] = "Romansh";
$languages["rof_TZ"] = "Rombo (Tanzania)";
$languages["rof"] = "Rombo";
$languages["ru_MD"] = "Russian (Moldova)";
$languages["ru_RU"] = "Russian (Russia)";
$languages["ru_UA"] = "Russian (Ukraine)";
$languages["ru"] = "Russian";
$languages["rwk_TZ"] = "Rwa (Tanzania)";
$languages["rwk"] = "Rwa";
$languages["saq_KE"] = "Samburu (Kenya)";
$languages["saq"] = "Samburu";
$languages["sg_CF"] = "Sango (Central African Republic)";
$languages["sg"] = "Sango";
$languages["seh_MZ"] = "Sena (Mozambique)";
$languages["seh"] = "Sena";
$languages["sr_Cyrl"] = "Serbian (Cyrillic)";
$languages["sr_Cyrl_BA"] = "Serbian (Cyrillic, Bosnia and Herzegovina)";
$languages["sr_Cyrl_ME"] = "Serbian (Cyrillic, Montenegro)";
$languages["sr_Cyrl_RS"] = "Serbian (Cyrillic, Serbia)";
$languages["sr_Latn"] = "Serbian (Latin)";
$languages["sr_Latn_BA"] = "Serbian (Latin, Bosnia and Herzegovina)";
$languages["sr_Latn_ME"] = "Serbian (Latin, Montenegro)";
$languages["sr_Latn_RS"] = "Serbian (Latin, Serbia)";
$languages["sr"] = "Serbian";
$languages["sn_ZW"] = "Shona (Zimbabwe)";
$languages["sn"] = "Shona";
$languages["ii_CN"] = "Sichuan Yi (China)";
$languages["ii"] = "Sichuan Yi";
$languages["si_LK"] = "Sinhala (Sri Lanka)";
$languages["si"] = "Sinhala";
$languages["sk_SK"] = "Slovak (Slovakia)";
$languages["sk"] = "Slovak";
$languages["sl_SI"] = "Slovenian (Slovenia)";
$languages["sl"] = "Slovenian";
$languages["xog_UG"] = "Soga (Uganda)";
$languages["xog"] = "Soga";
$languages["so_DJ"] = "Somali (Djibouti)";
$languages["so_ET"] = "Somali (Ethiopia)";
$languages["so_KE"] = "Somali (Kenya)";
$languages["so_SO"] = "Somali (Somalia)";
$languages["so"] = "Somali";
$languages["es_AR"] = "Spanish (Argentina)";
$languages["es_BO"] = "Spanish (Bolivia)";
$languages["es_CL"] = "Spanish (Chile)";
$languages["es_CO"] = "Spanish (Colombia)";
$languages["es_CR"] = "Spanish (Costa Rica)";
$languages["es_DO"] = "Spanish (Dominican Republic)";
$languages["es_EC"] = "Spanish (Ecuador)";
$languages["es_SV"] = "Spanish (El Salvador)";
$languages["es_GQ"] = "Spanish (Equatorial Guinea)";
$languages["es_GT"] = "Spanish (Guatemala)";
$languages["es_HN"] = "Spanish (Honduras)";
$languages["es_419"] = "Spanish (Latin America)";
$languages["es_MX"] = "Spanish (Mexico)";
$languages["es_NI"] = "Spanish (Nicaragua)";
$languages["es_PA"] = "Spanish (Panama)";
$languages["es_PY"] = "Spanish (Paraguay)";
$languages["es_PE"] = "Spanish (Peru)";
$languages["es_PR"] = "Spanish (Puerto Rico)";
$languages["es_ES"] = "Spanish (Spain)";
$languages["es_US"] = "Spanish (United States)";
$languages["es_UY"] = "Spanish (Uruguay)";
$languages["es_VE"] = "Spanish (Venezuela)";
$languages["es"] = "Spanish";
$languages["sw_KE"] = "Swahili (Kenya)";
$languages["sw_TZ"] = "Swahili (Tanzania)";
$languages["sw"] = "Swahili";
$languages["sv_FI"] = "Swedish (Finland)";
$languages["sv_SE"] = "Swedish (Sweden)";
$languages["sv"] = "Swedish";
$languages["gsw_CH"] = "Swiss German (Switzerland)";
$languages["gsw"] = "Swiss German";
$languages["shi_Latn"] = "Tachelhit (Latin)";
$languages["shi_Latn_MA"] = "Tachelhit (Latin, Morocco)";
$languages["shi_Tfng"] = "Tachelhit (Tifinagh)";
$languages["shi_Tfng_MA"] = "Tachelhit (Tifinagh, Morocco)";
$languages["shi"] = "Tachelhit";
$languages["dav_KE"] = "Taita (Kenya)";
$languages["dav"] = "Taita";
$languages["ta_IN"] = "Tamil (India)";
$languages["ta_LK"] = "Tamil (Sri Lanka)";
$languages["ta"] = "Tamil";
$languages["te_IN"] = "Telugu (India)";
$languages["te"] = "Telugu";
$languages["teo_KE"] = "Teso (Kenya)";
$languages["teo_UG"] = "Teso (Uganda)";
$languages["teo"] = "Teso";
$languages["th_TH"] = "Thai (Thailand)";
$languages["th"] = "Thai";
$languages["bo_CN"] = "Tibetan (China)";
$languages["bo_IN"] = "Tibetan (India)";
$languages["bo"] = "Tibetan";
$languages["ti_ER"] = "Tigrinya (Eritrea)";
$languages["ti_ET"] = "Tigrinya (Ethiopia)";
$languages["ti"] = "Tigrinya";
$languages["to_TO"] = "Tonga (Tonga)";
$languages["to"] = "Tonga";
$languages["tr_TR"] = "Turkish (Turkey)";
$languages["tr"] = "Turkish";
$languages["uk_UA"] = "Ukrainian (Ukraine)";
$languages["uk"] = "Ukrainian";
$languages["ur_IN"] = "Urdu (India)";
$languages["ur_PK"] = "Urdu (Pakistan)";
$languages["ur"] = "Urdu";
$languages["uz_Arab"] = "Uzbek (Arabic)";
$languages["uz_Arab_AF"] = "Uzbek (Arabic, Afghanistan)";
$languages["uz_Cyrl"] = "Uzbek (Cyrillic)";
$languages["uz_Cyrl_UZ"] = "Uzbek (Cyrillic, Uzbekistan)";
$languages["uz_Latn"] = "Uzbek (Latin)";
$languages["uz_Latn_UZ"] = "Uzbek (Latin, Uzbekistan)";
$languages["uz"] = "Uzbek";
$languages["vi_VN"] = "Vietnamese (Vietnam)";
$languages["vi"] = "Vietnamese";
$languages["vun_TZ"] = "Vunjo (Tanzania)";
$languages["vun"] = "Vunjo";
$languages["cy_GB"] = "Welsh (United Kingdom)";
$languages["cy"] = "Welsh";
$languages["yo_NG"] = "Yoruba (Nigeria)";
$languages["yo"] = "Yoruba";
$languages["zu_ZA"] = "Zulu (South Africa)";
$languages["zu"] = "Zulu";

if (pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_FILENAME) == "commit-transaction")
{
    include_once("includes/metadata-template.php");
    $filePath = "";
    $fileName = "";
    $fileNameBase = "";
    $packageMetadataTemplate = new MetadataTemplate();
}
else
{
    // Includes
    //
    
    include_once("includes/defines.php");
    include_once("includes/configuration.php");
    include_once("includes/communicator.php");
    include_once("includes/parameters.php");
    include_once("includes/metadata-template.php");
    include_once("includes/logger.php");
    include_once("includes/general-functions.php");
    include_once("includes/script-context.php");
    include_once("config.php");
    
    // Setup
    //
    
    // Setup logging
    $logger = new Logger($configuration->getValue("LogDir"));
    $logger->setLogDebug($configuration->getValue("LogDebug"));
    $logger->setLogInfo($configuration->getValue("LogInfo"));
    $logger->setLogWarning($configuration->getValue("LogWarning"));
    $logger->setLogError($configuration->getValue("LogError"));
    
    // Create communication line to GUI
    $communicator = new Communicator(false);
    
    // Input arguments
    //
    $parameters = new Parameters();

    // Get language
    if (!$parameters->get($language, 1))
    {
        exitWithError("Missing argument: Language");
    }
    if (!selectLanguage($language))
    {
        exitWithError("Failed to setup language: $language");
    }

    // Get context
    if (!$parameters->get($contextPath, 2))
    {
        exitWithError("Missing argument: Context");
    }
    $contextPath = normalizeFilePath($contextPath);
    $scriptContext = new ScriptContext();
    if (!$scriptContext->readFile($contextPath))
    {
        exitWithError("Failed to read context: $contextPath");
    }
    
    // Get file path
    //if (!$scriptContext->valueAsArray($filePathList, "FilePaths"))
    //{
    //    exitWithError("Failed to get file paths");
    //}
    //if (count($filePathList) != 1)
    //{
    //    exitWithError("Only one file path is allowed, got " . count($filePathList));
    //}
    //$filePath = $filePathList[0];
    //$fileName = basename($filePath);
    //$fileNameBase = pathinfo($fileName, PATHINFO_FILENAME);
    
    // Functions
    //
    
    // Metadata instructions
    //
    
    // Create template
    $packageMetadataTemplate = new MetadataTemplate();
}
?>
