mkxp/scripts/i18n_Language.rb

145 lines
4.2 KiB
Ruby
Raw Normal View History

2015-11-17 20:35:51 +00:00
class Language
2015-11-22 23:06:34 +00:00
attr_reader :font
attr_reader :character_table
attr_reader :character_table_height
def initialize(font, character_table, character_table_height)
@font = font
@character_table = character_table
@character_table_height = character_table_height
end
def self.get(code = :en)
return LANGUAGES[code] || LANGUAGES[:en]
end
2015-11-17 20:35:51 +00:00
LANGUAGES = {
:en => Language.new(
'Terminus (TTF)', [
"A","B","C","D","E",
"F","G","H","I","J",
"K","L","M","N","O",
"P","Q","R","S","T",
"U","V","W","X","Y",
"Z"," "," "," "," ",
"+","-","*","/","!",
"1","2","3","4","5",
"a","b","c","d","e",
"f","g","h","i","j",
"k","l","m","n","o",
"p","q","r","s","t",
"u","v","w","x","y",
"z"," "," "," "," ",
"#","$","%","&","@",
"6","7","8","9","0",
], 8
),
:es => Language.new(
'Terminus (TTF)', [
"A","B","C","D","E",
"F","G","H","I","J",
"K","L","M","N","O",
"P","Q","R","S","T",
"U","V","W","X","Y",
"Z"," ","Ñ","Ü"," ",
"Á","É","Í","Ó","Ú",
"+","-","*","/","!",
"1","2","3","4","5",
"a","b","c","d","e",
"f","g","h","i","j",
"k","l","m","n","o",
"p","q","r","s","t",
"u","v","w","x","y",
"z"," ","ñ","ü"," ",
"á","é","í","ó","ú",
"¡","#","%","&","@",
"6","7","8","9","0",
], 9
),
:ja => Language.new(
2015-11-23 01:33:32 +00:00
'WenQuanYi Micro Hei', [
2015-11-17 20:35:51 +00:00
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"", "","", "","",
"","","","","",
"", "","", "","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","", "", "", "",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"", "","", "","",
"","","","","",
"", "","", "","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","", "", "",
], 9
),
:ko => Language.new(
2015-11-23 01:33:32 +00:00
'WenQuanYi Micro Hei', [
2015-11-17 20:35:51 +00:00
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
"","","","","",
], 8
),
}
end