Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved documentation for get_locale and get_locales #37

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ mod provider {
}
}

/// Returns the active locale for the system or application.
/// Returns the most preferred locale for the system or application.
///
/// This may be equivalent to `get_locales().next()` (the first entry),
/// depending on the platform.
/// This is equivalent to `get_locales().next()` (the first entry).
///
/// # Returns
///
/// Returns `Some(String)` with a BCP-47 language tag inside. If the locale
/// couldn't be obtained, `None` is returned instead.
/// Returns [`Some(String)`] with a BCP 47 language tag inside.
/// If the locale couldn't be obtained, [`None`] is returned instead.
///
/// # Example
///
Expand All @@ -84,8 +83,8 @@ pub fn get_locale() -> Option<String> {
///
/// # Returns
///
/// Returns a `Vec` with any number of BCP-47 language tags inside.
/// If no locale preferences could be obtained, the vec will be empty.
/// Returns an [`Iterator`] with any number of BCP 47 language tags inside.
/// If no locale preferences could be obtained, the iterator will be empty.
///
/// # Example
///
Expand Down
Loading