# Translate plugin without specifying domain?

**URL:** <https://discourse.cakephp.org/t/translate-plugin-without-specifying-domain/5735>\
**Category:** Need Help\
**Created:** [March 4, 2019, 12:53pm UTC](https://discourse.cakephp.org/t/translate-plugin-without-specifying-domain/5735 "2019-03-04T12:53:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [March 4, 2019, 12:53pm UTC](https://discourse.cakephp.org/t/translate-plugin-without-specifying-domain/5735/1 "2019-03-04T12:53:03Z")

</div>

Hii there,

I’m trying to translate my plugin (namespace `Kikioboeru\Kikioboeru`), so I’ve added a locale file to the following location:

> plugins/Kikioboeru/Kikioboeru/src/Locale/nl\_NL/kikioboeru.po

In this file, I’ve added the following:

```auto
msgid "Users"
msgstr "Gebruikers"

```

This can then be used by adding the following code where needed:

```auto
__d('kikioboeru/kikioboeru','Users')

```

Now, my question is, is there a way to do it without the need of manually specifying the` Kikioboeru/Kikioboeru` part?  
I tried using the following, but that yielded no result:

```auto
__('Users')

```

I can do that by moving the locale file into the main app’s locale but that’s not very clean to do.

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [March 4, 2019, 8:49pm UTC](https://discourse.cakephp.org/t/translate-plugin-without-specifying-domain/5735/2 "2019-03-04T20:49:38Z")

</div>

As far as I know, a plugin’s translation needs to be specified this way. If the `__` function looked at all possible translation sources, how would it know how to resolve conflicts? For example, when the main app translates “field” like “grassy space” but a plugin translates it like “database column”?

---

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [March 5, 2019, 6:55am UTC](https://discourse.cakephp.org/t/translate-plugin-without-specifying-domain/5735/3 "2019-03-05T06:55:22Z")

</div>

Ah, I see.

Guess I’ll have to roll with it like this then 🙂
