# language\_dir

Source: https://zotonic.com/docs/2273/language_dir

URI: https://zotonic.com/id/2273

Language: en



Return `rtl` or `ltr` depening on the direction of the language.

Example:

```django
<div dir="{{ z_language|language_dir }}">
    {_ Text _}
</div>
```

Input can also be an resource (page) id. In that case the language that the resource is shown in will be used to determine the direction.

Example:

```django
<div lang="{{ id|language }}" dir="{{ id|language_dir }}">
    {{ id.body }}
</div>
```

It currently returns `rtl` for Arabic (`ar`), Farsi (`fa`) and Hebrew (`he`).

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2273?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2273?language=en>)
