lang: modify lang.rs to add Thai language

This commit is contained in:
Phongsathorn 2022-12-29 02:05:10 +07:00
parent becf2a9cd7
commit c5205af73f

View File

@ -29,6 +29,7 @@ mod gr;
mod sv; mod sv;
mod sq; mod sq;
mod sr; mod sr;
mod th;
lazy_static::lazy_static! { lazy_static::lazy_static! {
pub static ref LANGS: Value = pub static ref LANGS: Value =
@ -61,6 +62,7 @@ lazy_static::lazy_static! {
("sv", "Svenska"), ("sv", "Svenska"),
("sq", "Shqip"), ("sq", "Shqip"),
("sr", "Srpski"), ("sr", "Srpski"),
("th", "ภาษาไทย"),
]); ]);
} }
@ -117,6 +119,7 @@ pub fn translate_locale(name: String, locale: &str) -> String {
"sv" => sv::T.deref(), "sv" => sv::T.deref(),
"sq" => sq::T.deref(), "sq" => sq::T.deref(),
"sr" => sr::T.deref(), "sr" => sr::T.deref(),
"th" => th::T.deref(),
_ => en::T.deref(), _ => en::T.deref(),
}; };
if let Some(v) = m.get(&name as &str) { if let Some(v) = m.get(&name as &str) {