#!/usr/bin/php
<?php
/*********************************************************************************
 * The contents of this file are subject to the TimeTrex Public License Version
 * 1.1.0 ("License"); You may not use this file except in compliance with the
 * License. You may obtain a copy of the License at http://www.TimeTrex.com/TPL
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * All copies of the Covered Code must include on each user interface screen:
 *    (i) the "Powered by TimeTrex" logo and
 *    (ii) the TimeTrex copyright notice
 * in the same form as they appear in the distribution.  See full license for
 * requirements.
 *
 * The Original Code is: TimeTrex Open Source
 * The Initial Developer of the Original Code is TimeTrex Payroll Services
 * Portions created by TimeTrex are Copyright (C) 2004-2007 TimeTrex Payroll Services;
 * All Rights Reserved.
 *
 ********************************************************************************/
/*
 * $Revision: 929 $
 * $Id: mklocales.php 929 2007-06-07 17:44:50Z ipso $
 * $Date: 2007-06-07 10:44:50 -0700 (Thu, 07 Jun 2007) $
 *
 * File Contributed By: Open Source Consulting, S.A.   San Jose, Costa Rica.
 * http://osc.co.cr
 */
 
// creates the locale directories for use with gettext 
// and also initializes each with a messages.po file.
// Must be run from the i18n tools directory
//

$depth = '../..';

$locales = array(

// 'af_ZA',
// 'am_ET',
// 'as_IN',
// 'az_AZ',
// 'be_BY',
// 'bg_BG',
// 'bn_IN',
// 'bo_CN',
// 'br_FR',
// 'bs_BA',
// 'ca_ES',
// 'ce_RU',
// 'co_FR',
// 'cs_CZ',
// 'cy_GB',
// 'da_DK',
   'de_DE',
// 'dz_BT',
// 'el_GR',
   'en_US',
   'es_ES',
// 'et_EE',
// 'fa_IR',
// 'fi_FI',
// 'fj_FJ',
// 'fo_FO',
   'fr_FR',
// 'ga_IE',
// 'gd_GB',
// 'gu_IN',
// 'he_IL',
// 'hi_IN',
// 'hr_HR',
// 'hu_HU',
// 'hy_AM',
// 'id_ID',
// 'is_IS',
   'it_IT',
// 'ja_JP',
// 'jv_ID',
// 'ka_GE',
// 'kk_KZ',
// 'kl_GL',
// 'km_KH',
// 'kn_IN',
// 'ko_KR',
// 'kok_IN',
// 'lo_LA',
// 'lt_LT',
// 'lv_LV',
// 'mg_MG',
// 'mk_MK',
// 'ml_IN',
// 'mn_MN',
// 'mr_IN',
// 'ms_MY',
// 'mt_MT',
// 'my_MM',
// 'mni_IN',
// 'na_NR',
// 'nb_NO',
// 'ne_NP',
// 'nl_NL',
// 'nn_NO',
// 'no_NO',
// 'oc_FR',
// 'or_IN',
// 'pa_IN',
// 'pl_PL',
// 'ps_AF',
   'pt_PT',
// 'rm_CH',
// 'rn_BI',
// 'ro_RO',
// 'ru_RU',
// 'sa_IN',
// 'sc_IT',
// 'sg_CF',
// 'si_LK',
// 'sk_SK',
// 'sl_SI',
// 'so_SO',
// 'sq_AL',
// 'sr_YU',
// 'sv_SE',
// 'te_IN',
// 'tg_TJ',
// 'th_TH',
// 'tk_TM',
// 'tl_PH',
// 'to_TO',
// 'tr_TR',
// 'uk_UA',
// 'ur_PK',
// 'uz_UZ',
// 'vi_VN',
// 'wa_BE',
// 'wen_DE',
// 'lp_SG'

);

$dir = $depth . '/interface/locale';
chdir( $dir );

foreach( $locales as $locale ) {

  if( !is_dir( './' . $locale ) ) {

     $cmd = "mkdir $locale && mkdir $locale/LC_MESSAGES && msginit --no-translator -l $locale -o $locale/LC_MESSAGES/messages.po -i messages.pot";
     shell_exec( $cmd );
  
  }

}











?>
