Created
February 23, 2015 10:47
-
-
Save gluschenko/82df2c21121938beacce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
/* | |
Usage: | |
* GUI.Label(new Rect(10, 10, 100, 100), Local.Get("Play")); | |
* | |
*/ | |
public class Local { | |
public static int LanguageId = 0; | |
static int LanguagesNum = 4; | |
static string[] Words = new string[] { | |
"Play", "Играть", "Грати", "", | |
"Settings", "Настройки", "Налаштування", "", | |
"Controls", "Управление", "Управління", "", | |
"Scoreboard", "Рекорды", "Рекорди", "", | |
"Credits", "Титры", "Титри", "", | |
"Quit", "Выйти", "Вийти", "", | |
"Menu", "Меню", "Меню", "", | |
"Back", "Назад", "Назад", "", | |
"Language", "Язык", "Мова", "", | |
"Please wait...", "Подождите...", "Зачекайте...", "", | |
"", "", "", "", | |
"", "", "", "", | |
"", "", "", "", | |
"", "", "", "", | |
"", "", "", "", | |
"", "", "", "", | |
}; | |
public static string Get(string Orig) | |
{ | |
for(int i = 0; i < Words.Length; i += LanguagesNum) | |
{ | |
if(Words[i] == Orig) | |
{ | |
return Words[i + LanguageId]; | |
} | |
} | |
return Orig; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment