bevy_easy_localize 0.6.0

Lightweight localization in bevy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fs::read_to_string;
use bevy::{log::LogPlugin, prelude::*};
use bevy_easy_localize::Localize;
pub fn main() {
    App::new()
        .add_plugins(LogPlugin::default())
        .insert_resource(Localize::from_data(
            &read_to_string("examples/test.csv").unwrap(),
        ))
        .add_systems(Startup, hello)
        .run();
}

fn hello(mut localize: ResMut<Localize>) {
    localize.set_language("German");
    println!("{}", localize.get("hello"));
}