Title: Problem with localization (fix suggested)
Last modified: August 24, 2016

---

# Problem with localization (fix suggested)

 *  [alordiel](https://wordpress.org/support/users/alordiel/)
 * (@alordiel)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problem-with-localization-1/)
 * Hello,
 * There are several strings than can’t be translated (like ‘Courses’ and ‘Lessons’
   from the admin menu) because they are loaded before the loading of the textdomain.
 * Possible solutions:
    1. You can move the `load_plugin_textdomain` function from
   namste-model.php to the begining of `namaste.php`
 * 2. You can move up `add_action('init', array("NamasteLMS", "init"));` so first
   the textdomain is loaded and then everything else. (it is just this that I’m 
   not sure if there are any functions that will require anything else to be loaded
   before this.
 * [https://wordpress.org/plugins/namaste-lms/](https://wordpress.org/plugins/namaste-lms/)

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

 *  Plugin Author [Bob](https://wordpress.org/support/users/prasunsen/)
 * (@prasunsen)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problem-with-localization-1/#post-5967398)
 * Thanks for the suggestions. I am not sure calling load_plugin_textdomain outside
   of the init hook is “legal” but will investigate it.
 *  Thread Starter [alordiel](https://wordpress.org/support/users/alordiel/)
 * (@alordiel)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problem-with-localization-1/#post-5967563)
 * It is possible to include the loading of the text domain in separate function
   and then hooking it to `"plugins_loaded"` which is ok per [codex](https://codex.wordpress.org/Function_Reference/load_plugin_textdomain#Examples).
   But this is a bit out of the OOP way you are doing the plug-in.

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

The topic ‘Problem with localization (fix suggested)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/namaste-lms_b6c7ae.svg)
 * [Namaste! LMS](https://wordpress.org/plugins/namaste-lms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/namaste-lms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/namaste-lms/)
 * [Active Topics](https://wordpress.org/support/plugin/namaste-lms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/namaste-lms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/namaste-lms/reviews/)

## Tags

 * [load_plugin_textdomain](https://wordpress.org/support/topic-tag/load_plugin_textdomain/)
 * [Localization](https://wordpress.org/support/topic-tag/localization/)

 * 2 replies
 * 2 participants
 * Last reply from: [alordiel](https://wordpress.org/support/users/alordiel/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/problem-with-localization-1/#post-5967563)
 * Status: not resolved