mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
25c7169991
requested by @juliancoffee
25 lines
669 B
Rust
25 lines
669 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
#[serde(default)]
|
|
pub struct LanguageSettings {
|
|
pub selected_language: String,
|
|
#[serde(default = "default_true")]
|
|
/// Controls whether the locale is sent to servers we connect (usually for
|
|
/// localizing rules & motd messages)
|
|
pub send_to_server: bool,
|
|
pub use_english_fallback: bool,
|
|
}
|
|
|
|
impl Default for LanguageSettings {
|
|
fn default() -> Self {
|
|
Self {
|
|
selected_language: i18n::REFERENCE_LANG.to_string(),
|
|
send_to_server: true,
|
|
use_english_fallback: true,
|
|
}
|
|
}
|
|
}
|
|
|
|
fn default_true() -> bool { true }
|