This commit is contained in:
2025-08-06 15:39:05 +08:00
parent 351a79d54c
commit 6798be3b42
26 changed files with 1243 additions and 469 deletions

View File

@@ -30,6 +30,7 @@ impl SimpleI18n {
}
}
#[allow(dead_code)]
pub fn t(&self, key: &str) -> String {
let locale = self.get_current_locale();
@@ -63,6 +64,7 @@ fn get_i18n() -> &'static SimpleI18n {
}
// 便捷函数用于全局访问
#[allow(dead_code)]
pub fn t(key: &str) -> String {
get_i18n().t(key)
}