# TranslationProvider

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-protranslate-core/trait-translationprovider/

**trait** · [`ferroui-protranslate-core`](/docs/0.5.0/api/ferroui-protranslate-core/) · v0.5.0

```rust
trait TranslationProvider
```

A provider performs one exact-culture lookup; the service owns fallback.
Empty values are successful translations. Failures are distinct from misses.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/provider.rs#L106)

## Members

- [`name`](#function-name)
- [`get_string`](#function-get_string)
- [`revision`](#function-revision)

<a id="function-name"></a>

### name

```rust
fn name(self: &Self) -> &str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/provider.rs#L107)

<a id="function-get_string"></a>

### get_string

```rust
fn get_string(self: &Self, key: &str, culture: &Culture) -> Result<LocalizedString, TranslationError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/provider.rs#L108)

<a id="function-revision"></a>

### revision

```rust
fn revision(self: &Self) -> u64
```

Change this token when mutable catalog contents change. The service
invalidates cached hits and misses before its next lookup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/provider.rs#L112)

## Trait implementations

- [`TranslationProvider`](/docs/0.5.0/api/ferroui-protranslate-core/trait-translationprovider/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
