# Bulk replacement in translated strings?

**URL:** https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080
**Category:** Support
**Created:** [February 25, 2021, 2:19am UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080 "2021-02-25T02:19:38Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![pqMMA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pqmma/32/176332_2.png) [@pqMMA](https://meta.discourse.org/u/pqMMA)
#### Post date: [February 25, 2021, 2:19am UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/1 "2021-02-25T02:19:38Z")

</div>

I know that Discourse lets use now change text almost everyone on the site through the admin panel, but is there a way to do something like find and replace all?

I know categories and topics are fundamental to how Discourse was built, but what if I wanted to match the experience of the forum I’m migrated to and instead wanted to use ‘Forums’ to replace ‘Categories’ and ‘Threads’ to replace to ‘Topics’. ?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [February 25, 2021, 2:44am UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/2 "2021-02-25T02:44:10Z")

</div>

Yes, see this:

> [@Replace a string in all posts](https://meta.discourse.org/t/replace-a-string-in-all-posts/48729):
>
> bookmark This guide explains how to replace a string in all posts within a Discourse instance. person_raising_hand Required user level: System Administrator warning Console Access Required Want to replace a string in all the posts on a site? Let’s get started! warning WARNING: We strongly recommend you take a full backup before proceeding, and make sure your string replacement is specific enough to affect only the places you want it to. If this string replacement goes wrong, every…

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 25, 2021, 2:48am UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/3 "2021-02-25T02:48:23Z")

</div>

There is no easy way to do a bulk translation. It would also be a little confusing because the URLs would not reflect the changes.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 25, 2021, 2:49am UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/4 "2021-02-25T02:49:18Z")

</div>

I think that you could do it with a plugin that replaced the locale. I do think it would be confusing for people.

---

<div class="post-metadata">

### Author: ![Nitin\_Iyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nitin_iyer/32/239568_2.png) [@Nitin\_Iyer](https://meta.discourse.org/u/Nitin_Iyer)
#### Post date: [November 16, 2021, 6:09am UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/6 "2021-11-16T06:09:48Z")

</div>

I’m interested in doing something like this as well. If there’s a way to implement this while on a Standard or Business plan that would be great!

---

<div class="post-metadata">

### Author: ![codergautam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codergautam/32/261083_2.png) [@codergautam](https://meta.discourse.org/u/codergautam)
#### Post date: [May 23, 2022, 4:27pm UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/7 "2022-05-23T16:27:15Z")

</div>

Me too, I’m selfhosting though

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 23, 2022, 4:33pm UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/8 "2022-05-23T16:33:13Z")

</div>

It’s somewhat easier if you’re self hosting. I’d probaby do it at the rails console, though a plugin would be another way to do it.

What do you want to replace?

---

<div class="post-metadata">

### Author: ![codergautam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codergautam/32/261083_2.png) [@codergautam](https://meta.discourse.org/u/codergautam)
#### Post date: [May 23, 2022, 4:35pm UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/10 "2022-05-23T16:35:14Z")

</div>

I want to replace the text “Topic” to “Thread”. Is there a command to do it?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 23, 2022, 5:05pm UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/11 "2022-05-23T17:05:35Z")

</div>

I don’t see an easy way to do it. I think the easiest would be a plugin that overrides all of the instances you want to change, so you could do it in a text editor. It would probably take me a couple of hours. A few years ago, it might have been 5? You’d start with [GitHub - discourse/discourse-plugin-skeleton: Template for Discourse plugins · GitHub](https://github.com/discourse/discourse-plugin-skeleton) copy `config/locales/client.en.yml` into `config/locales` in the skeleton, delete the strings you don’t want to change and edit those that you want to change. Though there must be a way to get rails to give you all of the strings (oh, here’s this [https://stackoverflow.com/questions/37842701/how-to-list-all-available-locale-keys-in-rails](https://stackoverflow.com/questions/37842701/how-to-list-all-available-locale-keys-in-rails), and then you could loop through them all, get the string and insert a `TranslationOverride` for those you want to change, but the plugin route is probably better, as you’ll want to tweak stuff by hand and see what it is that you’re changing)

Trying to change “topic” to “thread” is a bad idea, though. No good can come from it. And Discourse doesn’t have threaded discussion, which is why they are called topics. And there won’t often be new strings added that contain “topic” but they could sneak in over time.

---

<div class="post-metadata">

### Author: ![codergautam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codergautam/32/261083_2.png) [@codergautam](https://meta.discourse.org/u/codergautam)
#### Post date: [May 23, 2022, 5:20pm UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/12 "2022-05-23T17:20:33Z")

</div>

Alright, I will try it later today. I guess it might be too much work for a simple thing. I know some JS and Python but never touched ruby.

Thanks for your help!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 23, 2022, 5:49pm UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/13 "2022-05-23T17:49:17Z")

</div>

Indeed. I’d recommend that you spend your time on pretty much anything else that you think will make your forum succeed.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [July 10, 2024, 10:12am UTC](https://meta.discourse.org/t/bulk-replacement-in-translated-strings/181080/14 "2024-07-10T10:12:33Z")

</div>

Just a reminder: I have written a plugin that can solve this

> [@Globally replace translations](https://meta.discourse.org/t/globally-replace-translations/315695):
>
> information_sourceSummary This plugin allows you to globally replace certain words in the translationhammer_and_wrenchRepository Link [https://github.com/Lhcfl/replace-translations-global](https://github.com/Lhcfl/replace-translations-global)open_bookInstall Guide [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157)Features Literally, replace all occurrences of a word with another word For example, replace “Topic” with “Nya”: Configuration I believe its settings are self-explanatory slightly_smiling_face Note…
