Title: Setup source folder for strings
Last modified: March 15, 2024

---

# Setup source folder for strings

 *  Resolved [Aldo](https://wordpress.org/support/users/ab_lu/)
 * (@ab_lu)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/)
 * Hello
 * We use [Radicle](https://roots.io/radicle/) to build our WordPress sites.
   The
   theme structure is different, as the actual template files reside outside the
   actual theme directory.
 * `/public/content/themes/my-theme
   /resources
 * Loco loads only the strings in the “my-theme” folder.
   I tried adding `../../../../
   resources/` to “Source file paths” but Loco Translate does still not pick up 
   the strings of all files in `/resources`.
 * Could you point me to the right direction on how to get this folder scanned by
   Loco Translate?
   Thanks

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17502630)
 * > Translate does still not pick up the strings of all files in /resources
 * I’m not clear on whether your adding of the source path has fixed the first problem(
   of files being outside the theme root). This would bring us to the next problem
   of no strings being extracted.
 * There are three points of failure as I see it: (1) A file is not considered. (
   2) A file is not readable. (3) The file is scanned, but string definitions in
   the code are not extracted.
 * Are you able to say which of these appears to be the problem?
 *  Thread Starter [Aldo](https://wordpress.org/support/users/ab_lu/)
 * (@ab_lu)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17502714)
 * Thanks for the quick feedback.
   – The files are readable As for 1 and 3, are there
   any way to debug that? Can I log somehow what files are considered and where?
   Files are checked recursively in a folder right? Are there any specifications
   in the naming conventions of a file? The files all end with *.blade.php.
    -  This reply was modified 2 years, 2 months ago by [Aldo](https://wordpress.org/support/users/ab_lu/).
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17502815)
 * I’m unfamiliar with blade templates. This may actually be the issue. Can you 
   post an example file with at least one localised string?
 * The .php extension should be enough. (From memory) I don’t think .blade.php would
   cause them to be missed. If you want to debug that for yourself, try logging 
   what files are considered during [this iteration](https://github.com/loco/wp-loco/blob/2.6.6/src/package/Project.php#L684).
 *  Thread Starter [Aldo](https://wordpress.org/support/users/ab_lu/)
 * (@ab_lu)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17502851)
 * Thanks for the feedback!
   I figured it out.
 * Template file was set to `*.pot`. After definite the correct path `.../../../../
   resources/languages/wm-app.pot` and name, the strings in de the defined folder
   started to appear.
 * One last remaining issue.
   The translations are now stored in the themes folder`/
   public/content/themes/my-theme`Is there a way to override this, so they get also
   stored where the template file resides in `.../../../../resources/language`?
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17503012)
 * > The translations are now stored in the themes folder …. Is there a way to override
   > this, so they get also stored where the template file resides … ?
 * The “author” location for translation files observes the “Domain Path” setting.
   You can override this in the Advanced tab.
 *  Thread Starter [Aldo](https://wordpress.org/support/users/ab_lu/)
 * (@ab_lu)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17503064)
 * Fantastic. All solved. Thanks a lot.
 * One last quest – maybe you can just join the to the docs.
   Is it possible to add
   also translations for a specific plugin to the same bundle? I’ve seen there is
   an option to “Add set”, but I’m not sure if it is intended for that?
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17503119)
 * Strictly speaking it goes against WordPress convention for a plugin to manage
   more than one text domain, or for one plugin to manage multiple text domains.
   But from Loco Translate’s perspective, these can both be achieved.
    1. Adding a set will mean you get multiple pairs of PO/MO translation files, whether
       in the same text domain or not. WordPress Core does this for the “default” text
       domain, [as mentioned here](https://localise.biz/wordpress/plugin/manual/bundle-config#multi).
    2. Adding extra source paths outside a plugin’s root allows for strings to be extracted
       from another plugin into the current one. This would be done if you wanted to
       configure a “master” plugin that’s responsible for translations across a suite
       of related plugins.
 * Mix and match these approaches depending on your exact use case.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Setup source folder for strings’ is closed to new replies.

 * ![](https://ps.w.org/loco-translate/assets/icon-256x256.png?rev=1000676)
 * [Loco Translate](https://wordpress.org/plugins/loco-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/loco-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/loco-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/loco-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/loco-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/loco-translate/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/setup-source-folder-for-strings/#post-17503119)
 * Status: resolved