Skip to content

Commit

Permalink
add i18n fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
fankaiLiu committed Oct 1, 2023
1 parent bc2fbb6 commit 2850327
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/i18n.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use rust_i18n::i18n;

pub fn set_locale() {
i18n!("locales", fallback = "en");
match get_language() {
Some(lang) => {
rust_i18n::set_locale(lang.as_str());
Expand Down

0 comments on commit 2850327

Please sign in to comment.