tpayLang

Class Lang.

Defined (1)

The class is defined in the following location(s).

/includes/lib/src/_class_tpay/lang.php  
  1. class Lang 
  2. const REGULATIONS = 'regulations'; 
  3.  
  4. /** 
  5. * Current language 
  6. * @var string 
  7. */ 
  8. private static $lang = 'en'; 
  9. /** 
  10. * Translation data 
  11. * @var array 
  12. */ 
  13. private static $data = array( 
  14. 'en' => array( 
  15.  
  16. // GLOBALS 
  17. 'fee_info' => 'Fee for using this payment method: ',  
  18. 'pay' => 'Pay with tpay.com',  
  19. 'merchant_info' => 'Merchant info',  
  20. 'amount' => 'Amount',  
  21. 'order' => 'Order',  
  22. // BLIK 
  23.  
  24. 'blik_info' => 'Type in 6 digit code and press pay to commit blik payment.',  
  25. 'blik_info2' => 'If you want to pay with standard method, leave this field blank.',  
  26. 'blik_accept' => 'By using this method you confirm acceptance',  
  27.  
  28. // BANK SELECTION 
  29. 'cards_and_transfers' => 'Credit cards and bank transfers',  
  30. 'other_methods' => 'Others',  
  31. 'accept' => 'I accept the',  
  32. 'regulations_url' => self::REGULATIONS,  
  33. self::REGULATIONS => 'of tpay.com service',  
  34. 'acceptance_is_required' => 'Acceptance of regulations is required before payment',  
  35.  
  36. // CARD 
  37.  
  38. 'card_number' => 'Card number',  
  39. 'expiration_date' => 'Expiration date',  
  40. 'signature' => 'For MasterCard, Visa or Discover, it\'s the last three digits 
  41. in the signature area on the back of your card.',  
  42. 'name_on_card' => 'Name on card',  
  43. 'name_surname' => 'Name and surname',  
  44. 'save_card' => 'Save my card',  
  45. 'save_card_info' => 'Let faster payments in future. Card data is stored on external, save server.',  
  46. 'processing' => 'Processing data, please wait...',  
  47. 'card_payment' => 'Payment',  
  48. 'debit' => 'Please debit my account',  
  49.  
  50. // DAC 
  51.  
  52. 'transfer_details' => 'Bank transfer details',  
  53. 'payment_amount' => 'The amount of the payment',  
  54. 'disposable_account' => 'Disposable account number for the payment',  
  55.  
  56. // SZKWAL 
  57.  
  58. 'account_number' => 'Account number',  
  59. 'payment_title' => 'Payment title',  
  60. 'payment_method' => 'Payment method',  
  61. 'szkwal_info' => 'Your title transfer is dedicated to you and very important for the identification of 
  62. payment. You can create a transfer as defined in its bank to 
  63. quickly and easily fund your account in the future',  
  64.  
  65. // WHITE LABEL 
  66.  
  67. 'go_to_bank' => 'Go to bank',  
  68. ),  
  69. 'pl' => array( 
  70.  
  71. // GLOBALS 
  72. 'fee_info' => 'Za korzystanie z p*atno*ci online sprzedawca dolicza: ',  
  73.  
  74. 'pay' => 'Zap*a* z tpay.com',  
  75. 'merchant_info' => 'Dane sprzedawcy',  
  76. 'amount' => 'Kwota',  
  77. 'order' => 'Zamwienie',  
  78.  
  79. // BLIK 
  80.  
  81. 'blik_info' => 'Wpisz 6 cyfrowy kod i naci*nij "Kupuj* i p*ac*" aby powi*za* transakcj* blik.',  
  82. 'blik_info2' => 'Je*li chcesz dokona* tradycyjnej p*atno*ci, pozostaw to pole puste.',  
  83. 'blik_accept' => 'Korzystaj*c z tej metody p*atno*ci o*wiadczasz, *e akceptujesz',  
  84.  
  85. // BANK SELECTION 
  86. 'cards_and_transfers' => 'Karty p*atnicze i przelewy',  
  87. 'other_methods' => 'Pozosta*e',  
  88. 'accept' => 'Akceptuj*',  
  89. 'regulations_url' => 'regulamin',  
  90. self::REGULATIONS => 'serwisu tpay.com',  
  91. 'acceptance_is_required' => 'Akceptacja regulaminu jest obowi*zkowa, przed rozpocz*ciem p*atno*ci',  
  92.  
  93. // CARD 
  94.  
  95. 'card_number' => 'Numer karty',  
  96. 'expiration_date' => 'Termin wa*no*ci',  
  97. 'signature' => 'Dla MasterCard, Visa lub Discover, s* to przy ostatnie 
  98. cyfry umieszczone przy podpisie karty.',  
  99. 'name_on_card' => 'W*a*ciciel karty',  
  100. 'name_surname' => 'Imi* i nazwisko',  
  101. 'save_card' => 'Zapisz moj* kart*',  
  102. 'save_card_info' => 'Zezwolenie na szybsz* p*atno** w przysz*o*ci. 
  103. Dane karty zostan* zapisane na serwerze tpay',  
  104. 'processing' => 'Przetwarzanie danych, prosz* czeka*...',  
  105. 'card_payment' => 'Zap*a*',  
  106. 'debit' => 'Prosz* obci**y* moje konto',  
  107.  
  108. // DAC 
  109.  
  110. 'transfer_details' => 'Szczeg*y przelewu',  
  111. 'payment_amount' => 'Kwota przelewu',  
  112. 'disposable_account' => 'Jednorazowy numer konta dla tej transakcji',  
  113.  
  114. // SZKWAL 
  115.  
  116. 'account_number' => 'Numer konta',  
  117. 'payment_title' => 'Tytu* przelewu',  
  118. 'payment_method' => 'Sposb p*atno*ci',  
  119. 'szkwal_info' => 'Twj tytu* przelewu jest dedykowany dla Ciebie i bardzo wa*ny dla identyfikacji wp*aty. 
  120. Mo*esz stworzy* przelew zdefiniowany w swoim banku, aby wygodnie i szybko zasili* swoje 
  121. konto w przysz*o*ci.',  
  122.  
  123. // WHITE LABEL 
  124.  
  125. 'go_to_bank' => 'Przejd* do banku',  
  126. ); 
  127.  
  128. /** 
  129. * Change current language 
  130. * @param string $lang language code 
  131. * @throws TException 
  132. */ 
  133. public static function setLang($lang) 
  134. if (isset(static::$data[$lang])) { 
  135. static::$lang = $lang; 
  136. } else { 
  137. throw new TException('No translation for this language'); 
  138.  
  139. /** 
  140. * Get and print translated string 
  141. * @param $key 
  142. */ 
  143. public static function l($key) 
  144. echo static::get($key); 
  145.  
  146. /** 
  147. * Get translated string 
  148. * @param string $key 
  149. * @throws TException 
  150. * @return string 
  151. */ 
  152. public static function get($key) 
  153. if (isset(static::$data[static::$lang][$key])) { 
  154. return static::$data[static::$lang][$key]; 
  155. } else { 
  156. throw new TException('No translation for this key');