# Translation

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-protranslate/struct-translation/

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

```rust
struct Translation
```

Native attached localization properties. Culture and direction inherit
through FerroUI's inheritance tree. Each target owns its subscription and
the callback holds only a weak target reference.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`key_property`](#function-key_property)
- [`fallback_value_property`](#function-fallback_value_property)
- [`string_format_property`](#function-string_format_property)
- [`culture_property`](#function-culture_property)
- [`auto_flow_direction_property`](#function-auto_flow_direction_property)
- [`source_property`](#function-source_property)
- [`error_property`](#function-error_property)
- [`set_service`](#function-set_service)
- [`get_source`](#function-get_source)
- [`set_source`](#function-set_source)
- [`get_key`](#function-get_key)
- [`set_key`](#function-set_key)
- [`get_fallback_value`](#function-get_fallback_value)
- [`set_fallback_value`](#function-set_fallback_value)
- [`set_fallback_text`](#function-set_fallback_text)
- [`get_string_format`](#function-get_string_format)
- [`set_string_format`](#function-set_string_format)
- [`get_culture`](#function-get_culture)
- [`set_culture`](#function-set_culture)
- [`get_auto_flow_direction`](#function-get_auto_flow_direction)
- [`set_auto_flow_direction`](#function-set_auto_flow_direction)
- [`to_flow_direction`](#function-to_flow_direction)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L21)

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

### key_property

```rust
fn key_property() -> &'static AttachedProperty<Option<String>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L23)

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

### fallback_value_property

```rust
fn fallback_value_property() -> &'static AttachedProperty<Option<BoxedValue>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L23)

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

### string_format_property

```rust
fn string_format_property() -> &'static AttachedProperty<Option<String>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L23)

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

### culture_property

```rust
fn culture_property() -> &'static AttachedProperty<Option<String>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L23)

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

### auto_flow_direction_property

```rust
fn auto_flow_direction_property() -> &'static AttachedProperty<bool>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L23)

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

### source_property

```rust
fn source_property() -> &'static AttachedProperty<Option<TranslationBindingSource>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L23)

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

### error_property

```rust
fn error_property() -> &'static AttachedProperty<Option<String>>
```

Last failure of attached-property evaluation, cleared after a successful refresh.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L23)

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

### set_service

```rust
fn set_service(service: TranslationService)
```

Configures the default source without invalidating already-created bindings.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L118)

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

### get_source

```rust
fn get_source(target: &FerroObject) -> TranslationBindingSource
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L122)

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

### set_source

```rust
fn set_source(target: &FerroObject, source: Option<TranslationBindingSource>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L127)

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

### get_key

```rust
fn get_key(target: &FerroObject) -> Option<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L130)

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

### set_key

```rust
fn set_key(target: &FerroObject, key: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L133)

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

### get_fallback_value

```rust
fn get_fallback_value(target: &FerroObject) -> Option<BoxedValue>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L136)

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

### set_fallback_value

```rust
fn set_fallback_value(target: &FerroObject, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L139)

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

### set_fallback_text

```rust
fn set_fallback_text(target: &FerroObject, value: Option<String>)
```

Sets a text fallback while the native property can hold any content object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L143)

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

### get_string_format

```rust
fn get_string_format(target: &FerroObject) -> Option<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L146)

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

### set_string_format

```rust
fn set_string_format(target: &FerroObject, value: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L149)

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

### get_culture

```rust
fn get_culture(target: &FerroObject) -> Option<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L152)

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

### set_culture

```rust
fn set_culture(target: &FerroObject, value: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L155)

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

### get_auto_flow_direction

```rust
fn get_auto_flow_direction(target: &FerroObject) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L158)

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

### set_auto_flow_direction

```rust
fn set_auto_flow_direction(target: &FerroObject, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L161)

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

### to_flow_direction

```rust
fn to_flow_direction(culture: &Culture) -> FlowDirection
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate/translation.rs#L165)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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