# Can't find how to localize a theme component

**URL:** https://meta.discourse.org/t/cant-find-how-to-localize-a-theme-component/260725
**Category:** Support
**Created:** [April 5, 2023, 9:16pm UTC](https://meta.discourse.org/t/cant-find-how-to-localize-a-theme-component/260725 "2023-04-05T21:16:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nicolas\_Barrera](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nicolas_barrera/32/287091_2.png) [@Nicolas\_Barrera](https://meta.discourse.org/u/Nicolas_Barrera)
#### Post date: [April 5, 2023, 9:16pm UTC](https://meta.discourse.org/t/cant-find-how-to-localize-a-theme-component/260725/1 "2023-04-05T21:16:12Z")

</div>

Hi there…

I 've tried to use the [Discourse Search Banner](https://meta.discourse.org/t/search-banner/122939) and localize it, so that the text on the banner shows up differently on different languates.

I 've read [this post about theme components now can include localizable strings](https://meta.discourse.org/t/add-localizable-strings-to-themes-and-theme-components/109867), and in fact this component includes localizable strings, and you can actually modify the strings from the discourse admin panel UI.

but… the theme component only offers an `en.yml` file with only english localizations… How am I supposed to be able to set a different header text for the banner when the user selects Spanish language for example?

I 've tried going into the general discourse Text localization feature but the keys from the theme components were not there, and I didn’t find another place where I could override the theme components localized string keys with different values per locale

is this possible?

or would I need to fork the theme component and modify it to support other locales?

thank you!

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 6, 2023, 12:53pm UTC](https://meta.discourse.org/t/cant-find-how-to-localize-a-theme-component/260725/2 "2023-04-06T12:53:37Z")

</div>

Hi, welcome!

You can either propose your translations on the GitHub repository or if you want to customize them directly in the admin panel; if I’m not wrong, I believe you have no choice but to change your language first, then the translations in the component settings. And you repeat for the wanted languages.

---

<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: [April 6, 2023, 9:37pm UTC](https://meta.discourse.org/t/cant-find-how-to-localize-a-theme-component/260725/3 "2023-04-06T21:37:33Z")

</div>

Yes, this is accurate. We haven’t added an interface for editing theme translations, so you have to change your language first from your account preferences (`community.example.com/my/preferences/interface`). Then if you visit admin/customize/themes you’ll be editing the text for the currently selected locale.

---

<div class="post-metadata">

### Author: ![Nicolas\_Barrera](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nicolas_barrera/32/287091_2.png) [@Nicolas\_Barrera](https://meta.discourse.org/u/Nicolas_Barrera)
#### Post date: [April 7, 2023, 1:06am UTC](https://meta.discourse.org/t/cant-find-how-to-localize-a-theme-component/260725/4 "2023-04-07T01:06:57Z")

</div>

I got it! Makes sense…  
Just didn’t imagined it was that way

Thank you all!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 8, 2023, 10:53am UTC](https://meta.discourse.org/t/cant-find-how-to-localize-a-theme-component/260725/5 "2023-06-08T10:53:26Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
