<p>You could try if the <a href="https://github.com/boboldehampsink/translate" rel="nofollow noreferrer">Translate plugin for Craft CMS</a> could help you out. You can use this plugin as a base for you own and save the values in a custom table and use the registerTranslateSources hook to return the values from your table</p>

<p>That would be some kind of mix between options 1 and option 2. Both are totally possible. I created such a plugin for my company too. Collect all uses of <code>|t</code> and check if there is a language fallback in the plugin translation file or if there is one in the default Craft translation file. If not you can mark the word as "untranslated" if yes save the record as translated. In your cp you'll display all your records with the hint if they are translated or not</p>

CC BY-SA 3.0
2018-02-20T15:58:34.147Z
Thanks Robin, the plugin is actually helpful! Just, the changes in the translations doesn't have any effect, even if the translation php have writing rights. Any idea?
Jan
CC BY-SA 3.0
2018-02-21T07:19:57.870Z
Yes that's unfortunately the case because there are bugs in this plugin. Like I said, you could use that one as your base and create something new
Robin Schambach
CC BY-SA 3.0
2018-02-20T07:32:40.300Z
2018-02-20T07:37:56.230Z
2018-02-20T07:37:56.230Z
Robin Schambach
<p>I am using a lot of translation with the |t / |translate filter. But the client wants to be able to edit those translations in the admin panel.</p>

<p>So, I thought about different ways to achieve that. Please drop your opinion.</p>

<ol>
<li>Create a new filter, refering to a table under the globals in admin panel. Never did that, but should be possible, right?</li>
<li>Try to get and edit the translation arrays in the phps in the translation folder (dont know how thats possible)</li>
<li>Don't use the |t filter at all. Instead maybe a matrix field type with 2  fields: one not translateable with the origin language and one translatable text field that is translateable. <strong>Disadvantage</strong>: instead of the convinient |filter I have write code to get the right translation. Also: what about performance?</li>
</ol>

<localization><globals>
Best practise to use translate in admin panel
# Best practise to use translate in admin panel

(Asked by: username_0 on 2018-02-20)

I am using a lot of translation with the |t / |translate filter. But the client wants to be able to edit those translations in the admin panel.

So, I thought about different ways to achieve that. Please drop your opinion.

1. Create a new filter, refering to a table under the globals in admin panel. Never did that, but should be possible, right?
2. Try to get and edit the translation arrays in the phps in the translation folder (dont know how thats possible)
3. Don't use the |t filter at all. Instead maybe a matrix field type with 2 fields: one not translateable with the origin language and one translatable text field that is translateable. **Disadvantage**: instead of the convinient |filter I have write code to get the right translation. Also: what about performance?

**Tags:** localization, globals


---

## 1 answers

### Answer by username_1 on 2018-02-20. Score: 1

You could try if the [Translate plugin for Craft CMS](https://github.com/boboldehampsink/translate) could help you out. You can use this plugin as a base for you own and save the values in a custom table and use the registerTranslateSources hook to return the values from your table

That would be some kind of mix between options 1 and option 2. Both are totally possible. I created such a plugin for my company too. Collect all uses of `|t` and check if there is a language fallback in the plugin translation file or if there is one in the default Craft translation file. If not you can mark the word as "untranslated" if yes save the record as translated. In your cp you'll display all your records with the hint if they are translated or not

> **Comments:**
> **username_0**: Thanks Robin, the plugin is actually helpful! Just, the changes in the translations doesn't have any effect, even if the translation php have writing rights. Any idea?  
> **username_1**: Yes that's unfortunately the case because there are bugs in this plugin. Like I said, you could use that one as your base and create something new  

---

