fluent_static/
lib.rs

1pub use intl_pluralrules;
2pub use once_cell;
3pub use unic_langid;
4
5pub use fluent_static_function as function;
6pub use fluent_static_macros::message_bundle;
7pub use fluent_static_value as value;
8
9mod message;
10
11pub use message::Message;
12pub mod formatter;
13
14pub mod support;
15
16#[macro_export]
17macro_rules! include_source {
18    ($name:expr) => {
19        include!(concat!(env!("OUT_DIR"), "/generated/fluent/", $name));
20    };
21}
22
23pub trait LanguageAware {
24    fn language_id(&self) -> &str;
25}
26
27pub trait MessageBundle: LanguageAware + Default {
28    fn get(language_id: &str) -> Option<Self>
29    where
30        Self: Sized;
31    fn default_language_id() -> &'static str;
32    fn supported_language_ids() -> &'static [&'static str];
33}