Localize.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. using System.Runtime.InteropServices;
  2. using UnityEngine;
  3. using System.Collections;
  4. public class Localize : MonoBehaviour
  5. {
  6. private static SystemLanguage language
  7. {
  8. get
  9. {
  10. return SystemLanguage.English;
  11. //return Application.systemLanguage;
  12. }
  13. }
  14. public UILabel mmFirstInfoText;
  15. public UILabel mmFirstInfoDetails;
  16. public UILabel mmFirstInfoLink;
  17. public UILabel mmmTapToStart;
  18. public UILabel mmShop;
  19. public UILabel lbTapToReturn;
  20. public UILabel hlpInstructions;
  21. public UILabel hlpSwipeLeftRight;
  22. public UILabel hlpSwipeToJump;
  23. public UILabel hlpSwipeToSlide;
  24. public UILabel setOptions;
  25. public UILabel setMusic;
  26. public UILabel setSound;
  27. public UILabel[] setOn;
  28. public UILabel[] setOff;
  29. public UILabel [] shopShop;
  30. public UILabel [] shopPowerups;
  31. public UILabel [] shopBack;
  32. public UILabel shopMagnetism;
  33. //public UILabel shopLevel;
  34. public UILabel shopBuy;
  35. public UILabel enregyYouNeedToReplanish;
  36. public UILabel enregyOr;
  37. public UILabel enregyItsFree;
  38. public UILabel enregyJstSelectOne;
  39. public UILabel goTanksYou;
  40. public UILabel goGameOver;
  41. public UILabel goNewBestScore;
  42. public UILabel goTapAnywere;
  43. public UILabel pauPause;
  44. public UILabel pauResume;
  45. public UILabel grettingsInfo;
  46. private void Start()
  47. {
  48. switch (language)
  49. {
  50. case SystemLanguage.English:
  51. grettingsInfo.text = "Takk fyrir að spila. Hér getur þú sent persónulega jólakveðju til þeirra barna sem fá Jólapakkana";
  52. //mmFirstInfoText.text = "Gerðu góðverk og\nsafnaðu jólapökkum til\nstyrktar Pakkasöfnun \nKringlunnar og\nmæðrastyrksnefndar";
  53. //mmFirstInfoDetails.text = "Nánar um\nsöfnunina á";
  54. mmFirstInfoText.text = "Kringlujól\nUm leið og þú spilar leggur þú góðu málefni lið, því pakkar sem þú vinnur fara í Pakkasöfnun Kringlunnar.";
  55. mmFirstInfoDetails.text = "Sjá nánar á";
  56. mmFirstInfoLink.text = "www.kringlan.is";
  57. mmmTapToStart.text = "smelltu til\nað byrja";
  58. lbTapToReturn.text = "Smelltu til\nað fara til baka";
  59. hlpInstructions.text = "Leiðbeiningar";
  60. hlpSwipeLeftRight.text = "Renndu fingri\ntil hliðanna til\nað fara framhjá\nhindrunum";
  61. hlpSwipeToJump.text = "Renndu fingri upp\ntil að hoppa";
  62. hlpSwipeToSlide.text = "Renndu fingri niður\ntil að renna undir";
  63. setOptions.text = "Stillingar";
  64. setMusic.text = "Tónlist";
  65. setSound.text = "Hljóð";
  66. for (int i = 0; i < setOn.Length; i++)
  67. {
  68. setOn[i].text = "On";
  69. }
  70. for (int i = 0; i < setOff.Length; i++)
  71. {
  72. setOff[i].text = "Off";
  73. }
  74. for (int i = 0; i < shopShop.Length; i++)
  75. {
  76. shopShop[i].text = "verslun";
  77. }
  78. mmShop.text = "verslun";
  79. for (int i = 0; i < shopPowerups.Length; i++)
  80. {
  81. shopPowerups[i].text = "hjálpartól";
  82. }
  83. for (int i = 0; i < shopBack.Length; i++)
  84. {
  85. shopBack[i].text = "til baka";
  86. }
  87. shopMagnetism.text = "Segulsvið";
  88. shopBuy.text = "kaupa";
  89. enregyYouNeedToReplanish.text = "Þig vantar meiri orku";
  90. enregyOr.text = "eða";
  91. enregyItsFree.text = "það er ókeypis!";
  92. enregyJstSelectOne.text = " veldu einn.";
  93. goTanksYou.text = "Takk fyrir\nað hjálpa\njólasveininum";
  94. goGameOver.text = "Leik lokið";
  95. goNewBestScore.text = "Nýtt stigamet";
  96. goTapAnywere.text = "Smelltu til\nað halda áfram";
  97. pauPause.text = "hlé";
  98. pauResume.text = "byrja aftur";
  99. break;
  100. case SystemLanguage.Russian:
  101. grettingsInfo.text = "Вы можете отправить личное сообщение для малышей, которые получат наши подарки";
  102. mmFirstInfoText.text = "Делайте добрые дела,\nчтобы заработать подарки\nдля поддержки\nцентров-гарантов\nпо беременности и родам.";
  103. mmFirstInfoDetails.text = "больше информации на:";
  104. mmFirstInfoLink.text = "www.kringlan.is";
  105. mmmTapToStart.text = "Нажмите,\nчтобы начать!";
  106. lbTapToReturn.text = "Нажмите,\nдля возврата";
  107. hlpInstructions.text = "Инструкции";
  108. hlpSwipeLeftRight.text = "Резко проведите в сторону,\nчтобы уклониться от преград";
  109. hlpSwipeToJump.text = "Проведите вверх для прыжка";
  110. hlpSwipeToSlide.text = "Проведите вниз для скольжения";
  111. setOptions.text = "Опции";
  112. setMusic.text = "Музыка";
  113. setSound.text = "Звуки";
  114. for (int i = 0; i < setOn.Length; i++)
  115. {
  116. setOn[i].text = "Вкл";
  117. }
  118. for (int i = 0; i < setOff.Length; i++)
  119. {
  120. setOff[i].text = "Выкл";
  121. }
  122. for (int i = 0; i < shopShop.Length; i++)
  123. {
  124. shopShop[i].text = "Магазин";
  125. }
  126. mmShop.text = "Магазин";
  127. for (int i = 0; i < shopPowerups.Length; i++)
  128. {
  129. shopPowerups[i].text = "Ускорители";
  130. }
  131. for (int i = 0; i < shopBack.Length; i++)
  132. {
  133. shopBack[i].text = "Назад";
  134. }
  135. shopMagnetism.text = "Магнетизм";
  136. shopBuy.text = "Купить";
  137. enregyYouNeedToReplanish.text = "Нужно восстановить силы:";
  138. enregyOr.text = "или";
  139. enregyItsFree.text = "Это бесплатно!";
  140. enregyJstSelectOne.text = "Просто выбери.";
  141. goTanksYou.text = "Спасибо,\nчто помогли Санте\nсобрать подарки!";
  142. goGameOver.text = "Игра закончена.";
  143. goNewBestScore.text = "Новый лучший результат.";
  144. goTapAnywere.text = "Нажмите где угодно,\n чтобы играть снова.";
  145. pauPause.text = "На паузе.";
  146. pauResume.text = "Возобновить";
  147. break;
  148. default:
  149. grettingsInfo.text = "You can send a personal message to the kids that get our xmas presents";
  150. mmFirstInfoText.text = "Do good deeds,\nto earn gifts\nto support the centers\nguarantor for pregnancy\nand childbirth.";
  151. mmFirstInfoDetails.text = "More info at:";
  152. mmFirstInfoLink.text = "www.kringlan.is";
  153. mmmTapToStart.text = "Tap to start";
  154. lbTapToReturn.text = "Tap anywhere to return";
  155. hlpInstructions.text = "Instructions";
  156. hlpSwipeLeftRight.text = "Swipe left and right\nto dogle obstacles";
  157. hlpSwipeToJump.text = "Swipe up to Jump";
  158. hlpSwipeToSlide.text = "Swipe down to Slide";
  159. setOptions.text = "Options";
  160. setMusic.text = "Music";
  161. setSound.text = "Sound";
  162. for (int i = 0; i < setOn.Length; i++)
  163. {
  164. setOn[i].text = "On";
  165. }
  166. for (int i = 0; i < setOff.Length; i++)
  167. {
  168. setOff[i].text = "Off";
  169. }
  170. for (int i = 0; i < shopShop.Length; i++)
  171. {
  172. shopShop[i].text = "Shop";
  173. }
  174. mmShop.text = "Shop";
  175. for (int i = 0; i < shopPowerups.Length; i++)
  176. {
  177. shopPowerups[i].text = "power ups";
  178. }
  179. for (int i = 0; i < shopBack.Length; i++)
  180. {
  181. shopBack[i].text = "back";
  182. }
  183. shopMagnetism.text = "Magnetism";
  184. shopBuy.text = "buy";
  185. enregyYouNeedToReplanish.text = "You need to replenish energy";
  186. enregyOr.text = "or";
  187. enregyItsFree.text = "it's free!";
  188. enregyJstSelectOne.text = " just select one.";
  189. goTanksYou.text = "Thank you for helping Santa";
  190. goGameOver.text = "Game over";
  191. goNewBestScore.text = "New best score";
  192. goTapAnywere.text = "Tap anywhere to continue";
  193. pauPause.text = "PAUSED";
  194. pauResume.text = "RESUME";
  195. break;
  196. }
  197. }
  198. public static string Score
  199. {
  200. get
  201. {
  202. switch (language)
  203. {
  204. case SystemLanguage.English:
  205. return "Point: ";
  206. case SystemLanguage.Russian:
  207. return "Очки: ";
  208. }
  209. return "Score: ";
  210. }
  211. }
  212. public static string Gift
  213. {
  214. get
  215. {
  216. switch (language)
  217. {
  218. case SystemLanguage.English:
  219. return "Gifts: ";
  220. case SystemLanguage.Russian:
  221. return "Подарки: ";
  222. }
  223. return "Gifts: ";
  224. }
  225. }
  226. public static string Distance
  227. {
  228. get
  229. {
  230. switch (language)
  231. {
  232. case SystemLanguage.English:
  233. return "Distance: ";
  234. case SystemLanguage.Russian:
  235. return "Дистанция: ";
  236. }
  237. return "Distance: ";
  238. }
  239. }
  240. public static string Level
  241. {
  242. get
  243. {
  244. switch (language)
  245. {
  246. case SystemLanguage.English:
  247. return "Level: ";
  248. case SystemLanguage.Russian:
  249. return "Уровень: ";
  250. }
  251. return "Level: ";
  252. }
  253. }
  254. }