# Можно ли переопределить локаль через файлы темы?

**URL:** <https://meta.discourse.org/t/can-you-override-the-locale-via-theme-files/263355>\
**Category:** Development\
**Created:** [01.Май.2023 05:50:30 UTC](https://meta.discourse.org/t/can-you-override-the-locale-via-theme-files/263355 "2023-05-01T05:50:30Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [02.Май.2023 14:58:47 UTC](https://meta.discourse.org/t/can-you-override-the-locale-via-theme-files/263355/6 "2023-05-02T14:58:47Z")

</div>

> [@Lhc\_fl](#):
>
> `I18n.translations[I18n.currentLocale()].js.composer.reply = "ylper";`

> [@sevadev-ramchandra](#):
>
> Можно ли этого добиться через файлы локализации YML?

Вы можете комбинировать эти два подхода, например:

```js
I18n.translations[I18n.currentLocale()].js.composer.reply = I18n.t(themePrefix("my_translation_key"));

```

---

_[View the full topic](https://meta.discourse.org/t/can-you-override-the-locale-via-theme-files/263355)._
