Browse Source

language added for russia

pull/1/head
gme_2 6 years ago
parent
commit
31cc103a88
  1. 74
      GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift
  2. 3
      GMERemittance/Utility/AppConstants.swift
  3. 13
      ru-RU.lproj/Localizable.strings
  4. 2
      th.lproj/Localizable.strings

74
GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift

@ -15,11 +15,11 @@ import DTTJailbreakDetection
class SplashScreenViewController: UIViewController { class SplashScreenViewController: UIViewController {
struct StringConstants { struct StringConstants {
let descriptionFirst = "hassle_free_transfer_text".localized()
let descriptionSecond = "connect_local_community_text".localized()
let descriptionThird = "earn_reward_point_text".localized()
let loginText = "login_text".localized()
let newUserText = "new_user_text".localized()
let descriptionFirst = "hassle_free_transfer_text".localized()
let descriptionSecond = "connect_local_community_text".localized()
let descriptionThird = "earn_reward_point_text".localized()
let loginText = "login_text".localized()
let newUserText = "new_user_text".localized()
} }
// MARK: IBOutlets // MARK: IBOutlets
@ -53,7 +53,7 @@ class SplashScreenViewController: UIViewController {
let imageThird = UIImage(named: "ic_splashThirdScreen") let imageThird = UIImage(named: "ic_splashThirdScreen")
var languageIndex = 0 var languageIndex = 0
var languages: [SendMoneyCountryViewModel] = [] var languages: [SendMoneyCountryViewModel] = []
var selectedLanguage: SendMoneyCountryViewModel? { var selectedLanguage: SendMoneyCountryViewModel? {
didSet { didSet {
@ -63,27 +63,31 @@ class SplashScreenViewController: UIViewController {
if code == "lk" { if code == "lk" {
Localize.setCurrentLanguage("si") Localize.setCurrentLanguage("si")
}else }else
if code == "kh" {
Localize.setCurrentLanguage("km")
}else
if code == "kr" {
Localize.setCurrentLanguage("ko")
}else
if code == "mm" {
Localize.setCurrentLanguage("my")
}else
if code == "bd" {
Localize.setCurrentLanguage("bn")
}
else
if code == "kh" {
Localize.setCurrentLanguage("km")
}else
if code == "np" {
Localize.setCurrentLanguage("ne")
}
if code == "kr" {
Localize.setCurrentLanguage("ko")
}else
if code == "mm" {
Localize.setCurrentLanguage("my")
}else
if code == "bd" {
Localize.setCurrentLanguage("bn")
}
else
if code == "np" {
Localize.setCurrentLanguage("ne")
}
if code == "ru" {
Localize.setCurrentLanguage("ru-RU")
}
else { else {
Localize.setCurrentLanguage(code) Localize.setCurrentLanguage(code)
} }
@ -95,7 +99,7 @@ class SplashScreenViewController: UIViewController {
var presenter: SplashScreenModuleInterface? var presenter: SplashScreenModuleInterface?
// MARK: VC's Life cycle // MARK: VC's Life cycle
override func viewDidLoad() { override func viewDidLoad() {
@ -167,13 +171,13 @@ class SplashScreenViewController: UIViewController {
self.languageBackGroundView.clipsToBounds = true self.languageBackGroundView.clipsToBounds = true
self.languageBackGroundView.layer.addShadow(offset: CGSize.init(width: 2, height: 2)) self.languageBackGroundView.layer.addShadow(offset: CGSize.init(width: 2, height: 2))
NotificationCenter.default.addObserver(self, selector: #selector(setText), name: NSNotification.Name(LCLLanguageChangeNotification), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(setText), name: NSNotification.Name(LCLLanguageChangeNotification), object: nil)
configureTimer() configureTimer()
setupLanguages() setupLanguages()
configureLanguage() configureLanguage()
} }
@objc func setText() { @objc func setText() {
self.buttonLogin.setTitle("login_text".localized(), for: .normal) self.buttonLogin.setTitle("login_text".localized(), for: .normal)
self.buttonSignUp.setTitle("new_user_text".localized(), for: .normal) self.buttonSignUp.setTitle("new_user_text".localized(), for: .normal)
@ -181,8 +185,8 @@ class SplashScreenViewController: UIViewController {
setImageandLabels() setImageandLabels()
} }
func setupLanguages() {
func setupLanguages() {
self.languages = Utility.getLanguages() self.languages = Utility.getLanguages()
} }
@ -233,12 +237,12 @@ class SplashScreenViewController: UIViewController {
imageViewHomeLogo.image = imageFirst imageViewHomeLogo.image = imageFirst
labelHomeDescription.text = StringConstants().descriptionFirst labelHomeDescription.text = StringConstants().descriptionFirst
case 1: case 1:
imageViewDotCenter.image = imageDotSelected imageViewDotCenter.image = imageDotSelected
imageViewHomeLogo.image = imageSecond imageViewHomeLogo.image = imageSecond
labelHomeDescription.text = StringConstants().descriptionSecond labelHomeDescription.text = StringConstants().descriptionSecond
case 2: case 2:
imageViewDotRight.image = imageDotSelected imageViewDotRight.image = imageDotSelected
imageViewHomeLogo.image = imageThird imageViewHomeLogo.image = imageThird
labelHomeDescription.text = StringConstants().descriptionThird labelHomeDescription.text = StringConstants().descriptionThird
@ -258,7 +262,7 @@ class SplashScreenViewController: UIViewController {
self.view.backgroundColor = AppConstants.themeRedColor self.view.backgroundColor = AppConstants.themeRedColor
self.buttonSignUp.backgroundColor = AppConstants.themeDarkRedColor self.buttonSignUp.backgroundColor = AppConstants.themeDarkRedColor
self.buttonLogin.backgroundColor = AppConstants.themeBlueColor self.buttonLogin.backgroundColor = AppConstants.themeBlueColor
// self.buttonSignUp.backgroundColor = AppConstants.themeBlueColor
// self.buttonSignUp.backgroundColor = AppConstants.themeBlueColor
} }
private func setupTimer() { private func setupTimer() {
@ -304,8 +308,8 @@ class SplashScreenViewController: UIViewController {
viewcontroller.type = PickerTitle.country viewcontroller.type = PickerTitle.country
self.present(viewcontroller, animated: true, completion: nil) self.present(viewcontroller, animated: true, completion: nil)
} }
func countrySelected(models: [SendMoneyCountryViewModel]) { func countrySelected(models: [SendMoneyCountryViewModel]) {
self.selectedLanguage = models.first self.selectedLanguage = models.first
} }

3
GMERemittance/Utility/AppConstants.swift

@ -307,7 +307,8 @@ extension Utility {
let russian = SendMoneyCountryViewModel() let russian = SendMoneyCountryViewModel()
russian.name = "russian_langugae_text".localized() russian.name = "russian_langugae_text".localized()
russian.id = "russian_langugae_text"
russian.id = "русский"
russian.title = "русский"
russian.code = "ru" russian.code = "ru"
let vietnam = SendMoneyCountryViewModel() let vietnam = SendMoneyCountryViewModel()

13
ru-RU.lproj/Localizable.strings

@ -372,3 +372,16 @@
"language_text" = "язык"; "language_text" = "язык";
"korean_language_text" = "한국어";
"cambodia_lanugage_text" = "ភាសាខ្មែរ";
"srilanka_lanugage_text" = "සිංහල";
"myanmar_language_text" = "မြန်မာ";
"russian_langugae_text" = "русский";
"vietnam_language_text" = "Tiếng Việt";
"thailand_language_text" = "ไทย";
"indonesia_language_text" = "bahasa Indonesia";
"mongolia_language_text" = "Монгол хэл дээр";
"nepali_language_text" = "नेपाली";
"bengali_language_text" = "বাংলা";
"uzbek_language_text" = "O'zbek";
"english_language_text" = "English";

2
th.lproj/Localizable.strings

@ -5,7 +5,7 @@
"earn_reward_point_text" = "สะสมคะแนนแลกของรางวัลมากมาย"; "earn_reward_point_text" = "สะสมคะแนนแลกของรางวัลมากมาย";
"login_title_text" = "ยินดีต้อนรับสู่ Global Money Express"; "login_title_text" = "ยินดีต้อนรับสู่ Global Money Express";
"login_subtitle_text" = "เข้าสู่ระบบด้วยอีเมล์หรือหมายเลขโทรศัพท์";
"login_subtitle_text" = "เข้าสู่ระบบด้วยอีเมล์";
"login_user_id_text" = "ชื่อผู้ใช้งาน"; "login_user_id_text" = "ชื่อผู้ใช้งาน";
"user_Id_placeholder_text" = "ลงทะเบียนด้วยอีเมล์หรือหมายเลขโทรศัพท์มือถือ"; "user_Id_placeholder_text" = "ลงทะเบียนด้วยอีเมล์หรือหมายเลขโทรศัพท์มือถือ";
"password_text" = "รหัสผ่าน"; "password_text" = "รหัสผ่าน";

Loading…
Cancel
Save