Skip to content

i18n-locale should inject dir attribute #16047

Description

🚀 Feature request

Add dir="rtl" for rtl locales

Command (mark with an x)

- [ ] new
- [ x ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

A clear and concise description of the problem or missing capability...

Angular pages are always LTR, even when specifying an rtl language in i18n-locale parameter

Describe the solution you'd like

If you have a solution in mind, please describe it.

When running build with i18n-locale set to an RTL language such as Hebrew or Arabic, add dir="rtl" to html or body tags in index.html.
I know that the cli can modify the html, because base-href parameter does it

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

Manually setting the dir tag, but then what happens if I want to support different build configs for rtl, and ltr locales? I will have to manually change the dir tag before every build.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions