Changeset 859

Show
Ignore:
Timestamp:
06/26/08 12:55:08 (2 months ago)
Author:
rach
Message:

correct rules for the language russian

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/common/lib/Class.A2Billing.php

    r848 r859  
    146146 
    147147        var $languageselected; 
     148        var $current_language; 
    148149 
    149150 
     
    624625                        } 
    625626 
     627            $this ->current_language = $language;   
    626628                        if($this->agiconfig['asterisk_version'] == "1_2") { 
    627629                                $lg_var_set = 'LANGUAGE()'; 
     
    638640                        $this->languageselected = 1; 
    639641                        $language = strtolower($this->agiconfig['force_language']); 
     642                        $this ->current_language = $language; 
    640643                        if($this->agiconfig['asterisk_version'] == "1_2") { 
    641644                                $lg_var_set = 'LANGUAGE()'; 
     
    13351338                                $agi->say_number($units); 
    13361339 
    1337                                 if((strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){ 
     1340                                if(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){ 
    13381341                                                // test for the specific grammatical rules in RUssian 
    13391342                                                $agi-> stream_file('dollar2', '#'); 
     1343                                        }elseif(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( $units%10==1)) { 
     1344                                                // test for the specific grammatical rules in RUssian 
     1345                                                $agi-> stream_file($unit_audio, '#'); 
    13401346                                        }else{ 
    13411347                                                $agi-> stream_file($units_audio, '#'); 
     
    13441350                        }else{ 
    13451351                                $agi->say_number($units); 
     1352                                 
     1353                                if(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ($units == 0)){ 
     1354                                $agi-> stream_file($units_audio, '#');   
     1355                                }else{                                   
    13461356                                $agi-> stream_file($unit_audio, '#'); 
     1357                                } 
    13471358                        } 
    13481359 
     
    13531364                                $agi->say_number($cents); 
    13541365                                if($cents>1){ 
    1355                                         if((strtolower($this->agiconfig['force_language'])=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){ 
     1366                                        if((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){ 
    13561367                                                // test for the specific grammatical rules in RUssian 
    13571368                                                $agi-> stream_file('prepaid-cent2', '#'); 
     1369                                        }elseif((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&&  ( $cents%10==1)  ){ 
     1370                                                // test for the specific grammatical rules in RUssian 
     1371                                                $agi-> stream_file($cent_audio, '#'); 
    13581372                                        }else{ 
    13591373                                                $agi-> stream_file($cents_audio, '#'); 
     
    14171431                        if ($units > 1){ 
    14181432                                $agi -> say_number($units); 
    1419                                         if((strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){ 
    1420                                                 // test for the specific grammatical rules in RUssian 
    1421                                                 $agi-> stream_file('dollar2', '#'); 
    1422                                         }else{ 
    1423                                                 $agi-> stream_file($units_audio, '#'); 
    1424                                         } 
     1433                                         
     1434                                if(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){ 
     1435                                        // test for the specific grammatical rules in RUssian 
     1436                                        $agi-> stream_file('dollar2', '#'); 
     1437                                }elseif(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( $units%10==1)) { 
     1438                                        // test for the specific grammatical rules in RUssian 
     1439                                        $agi-> stream_file($unit_audio, '#'); 
     1440                                }else{ 
     1441                                        $agi-> stream_file($units_audio, '#'); 
     1442                                } 
     1443                                         
    14251444                        }else{ 
    14261445                                $agi -> say_number($units); 
     
    14331452                        if ($cents>0){ 
    14341453                                $agi -> say_number($cents); 
     1454                                 
     1455                                 
    14351456                                if($cents>1){ 
    1436                                         if((strtolower($this->agiconfig['force_language'])=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){ 
     1457                                        if((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){ 
    14371458                                                // test for the specific grammatical rules in RUssian 
    14381459                                                $agi-> stream_file('prepaid-cent2', '#'); 
     1460                                        }elseif((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&&  ( $cents%10==1)  ){ 
     1461                                                // test for the specific grammatical rules in RUssian 
     1462                                                $agi-> stream_file($cent_audio, '#'); 
    14391463                                        }else{ 
    14401464                                                $agi-> stream_file($cents_audio, '#'); 
     
    14431467                                $agi-> stream_file($cent_audio, '#'); 
    14441468                                } 
     1469                                 
     1470                                 
     1471                                 
    14451472 
    14461473                                $agi -> stream_file($cent_audio, '#'); 


Google