pub fn load(configuration: Config) -> anyhow::Result<Languages> {
    let mut languages = Languages::new(&configuration);

    for lang in configuration.get_languages().iter() {
        languages.try_get_language(lang)?;
    }

    Ok(languages)
}
/// Load the languages of a configuration and return the `Languages` struct.
///
/// # Example
/// ```rust, ignore
/// use languages_rs::{Config, load};
///
/// let mut config = Config::default();
///
/// // Add `en` language to the configuration.
/// config.add_language("en").unwrap();
///
/// // This loads `languages/en.json` to the cache.
/// let texts = load(config);
/// ```
Load the languages of a configuration and return the `Languages` struct.
Load the languages of a configuration and return the ` Languages ` struct .
pub fn load(configuration: Config) -> anyhow::Result<Languages> {
    let mut languages = Languages::new(&configuration);
    for lang in configuration.get_languages().iter() {
        languages.try_get_language(lang)?;
    }
    Ok(languages)
}
pub fn load ( configuration : Config ) -> anyhow :: Result < Languages > { let mut languages = Languages :: new ( & configuration ) ; for lang in configuration . get_languages ( ) . iter ( ) { languages . try_get_language ( lang ) ? ; } Ok ( languages ) }
Load the languages of a configuration and return the `Languages` struct.
Load the languages of a configuration and return the ` Languages ` struct .
configuration
Config
configuration
Config
example
```rust, ignore
use languages_rs::{Config, load}.

let mut config = Config::default().

Add `en` language to the configuration.
config.add_language("en").unwrap().

This loads `languages/en.json` to the cache.
let texts = load(config);
```
` ` ` rust ignore use languages_rs :: { Config load } . let mut config = Config :: default () . Add ` en ` language to the configuration . config . add_language ( " en " ) . unwrap () . This loads ` languages / en . json ` to the cache . let texts = load ( config ) ; ` ` `