Title: Custom does not overwrite author
Last modified: May 5, 2023

---

# Custom does not overwrite author

 *  Resolved [peterforensys](https://wordpress.org/support/users/peterforensys/)
 * (@peterforensys)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/)
 * Hello! Loco translate translation in custom directory does not overwrite translation
   in author directory. It happens with VikBooking plugin.
 * I know that cutsom directory provides priority over the other two locations.
   
   What can cause my problem then?

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

 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16713307)
 * Educated guess: it _could_ be that the plugin is forcing the use of its own MO
   files above all others. I’ve seen this done by authors due the fact that WordPress
   gives priority to the GlotPress community translations.
 * I would need to see the code. If it’s an open source plugin, please provide a
   link to download it.
 *  Thread Starter [peterforensys](https://wordpress.org/support/users/peterforensys/)
 * (@peterforensys)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16713316)
 * Hi!
   I will ask them. But maybe its faster if you check it as this is very important
   to work. The thing is that custom directory worked until the last update of VikBooking
   plugin. Maybe they changed something.Here is the plugin free version, you can
   download it: [https://wordpress.org/plugins/vikbooking/](https://wordpress.org/plugins/vikbooking/)
 * Thank you!
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16713557)
 * There’s a lot of unnecessary code in this plugin related to loading language 
   files. It even includes code to look for files in Loco Translate’s folder, which
   is not necessary when loading text domains normally.
 * I’ve managed to locate the issue to [some code which deliberately unsets loaded text domains](https://plugins.trac.wordpress.org/browser/vikbooking/tags/1.6.2/libraries/adapter/language/language.php#L141).
   Loco Translate actually does load the custom file, but then it’s removed.
 * This has taken me an hour, and it’s somewhat outside the scope of my support 
   to debug third party code. I suggest you ask the developers nicely to review 
   this.
 *  Thread Starter [peterforensys](https://wordpress.org/support/users/peterforensys/)
 * (@peterforensys)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16713575)
 * Hello!
   Thank you, I will tell this to VikBooking support. I hope in the future
   they will improve their code. For now, thanks for helping, I really appreciate
   it.
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16713586)
 * I’m sure all the code is well intentioned, but it seems over-complex and probably
   under-tested. To be clear, it’s the `refreshDomain` function in that file that
   unsets domains. Commenting out line 141 will “fix” your issue, but may cause 
   other problems. Up to you if you want to try that.
 * I’m closing this for now as there’s nothing for me to address re my plugin.
 *  Thread Starter [peterforensys](https://wordpress.org/support/users/peterforensys/)
 * (@peterforensys)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16713617)
 * Hello Tim!
   Okay, thank you for your time.
 *  Thread Starter [peterforensys](https://wordpress.org/support/users/peterforensys/)
 * (@peterforensys)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16714159)
 * Hi! Just an extra info: I deleted the author located translation and now the 
   custom located translation is working. This is the fastest solution I guess but
   still not the best as there is a chance that next time when I update VikBooking
   the author located translation comes back and I need to check this on every update
   and delete it.

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

The topic ‘Custom does not overwrite author’ 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: [peterforensys](https://wordpress.org/support/users/peterforensys/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/custom-does-not-overwrite-author/#post-16714159)
 * Status: resolved