2016-11-26 2 views
0

나는 2 개 언어, 러시아어 및 영어 (모두 다 두 언어로 잘 작동 함)에서 이미 작동하는 웹 사이트를 운영하고 있습니다. 이제는 아르메니아어를 추가했습니다. 내가 카탈로그 \ 언어 \ 아르 멘 \ 확인했다opencart 2.3 기본 언어 이외의 언어

문제점 --- 내가 armenain 언어로 웹 사이트에 전환 할 때, 내가 빵 부스러기

text_home button_continue의 button_login, 예를 들어, 참조 .... \ armenian.php 파일에 존재하고이 변수의 값이 있음을 알 수 있습니다. 그런데

,이 코드가 작동

$_['text_home']    = 'arm_home'; 

.PHP 예를 들어, 언어/아르 멘/일반/헤더로 armenian.php에서 추가 할 수 있지만 thit 내가 손으로 추가해야한다는 것을 의미 매 페이지의 관리자 패널에서이 일반 변수 ... 내가 더 최적의 솔루션을 가지고 싶습니다 ...

가 나는 시스템 \ 라이브러리 \ 언어를 편집해야

아마 기본 언어로 armenain 설정합니다. PHP ??? 여기

<?php 
class Language { 
    private $default = 'en-gb'; 
    private $directory; 
    private $data = array(); 

    public function __construct($directory = '') { 
     $this->directory = $directory; 
    } 

    public function get($key) { 
     return (isset($this->data[$key]) ? $this->data[$key] : $key); 
    } 

    public function set($key, $value) { 
     $this->data[$key] = $value; 
    } 

    // Please dont use the below function i'm thinking getting rid of it. 
    public function all() { 
     return $this->data; 
    } 

    // Please dont use the below function i'm thinking getting rid of it. 
    public function merge(&$data) { 
     array_merge($this->data, $data); 
    } 

    public function load($filename, &$data = array()) { 
     $_ = array(); 

     $file = DIR_LANGUAGE . 'english/' . $filename . '.php'; 

     // Compatibility code for old extension folders 
     $old_file = DIR_LANGUAGE . 'english/' . str_replace('extension/', '', $filename) . '.php'; 

     if (is_file($file)) { 
      require($file); 
     } elseif (is_file($old_file)) { 
      require($old_file); 
     } 

     $file = DIR_LANGUAGE . $this->default . '/' . $filename . '.php'; 

     // Compatibility code for old extension folders 
     $old_file = DIR_LANGUAGE . $this->default . '/' . str_replace('extension/', '', $filename) . '.php'; 

     if (is_file($file)) { 
      require($file); 
     } elseif (is_file($old_file)) { 
      require($old_file); 
     } 

     $file = DIR_LANGUAGE . $this->directory . '/' . $filename . '.php'; 

     // Compatibility code for old extension folders 
     $old_file = DIR_LANGUAGE . $this->directory . '/' . str_replace('extension/', '', $filename) . '.php'; 

     if (is_file($file)) { 
      require($file); 
     } elseif (is_file($old_file)) { 
      require($old_file); 
     } 


     $this->data = array_merge($this->data, $_); 

     return $this->data; 
    } 
} 

내가 OC 2.3, https://crowdin.com/project/opencart-translation-v2/hy-AM#

+0

내가 생각 솔루션과 호환되지 않았습니다 armenain 언어 이전 패키지를 사용 – HarnishDesign

답변

0

사전에 감사 구조, 당신이 필요합니다 알 메니안 언어를 제대로 확인하는 것. 아르메니아어는 OpenCart 2.3.0.2 버전과 호환됩니까?