Title: load_languages function in your class
Last modified: August 30, 2016

---

# load_languages function in your class

 *  Resolved [Michel – xiligroup dev](https://wordpress.org/support/users/michelwppi/)
 * (@michelwppi)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/load_languages-function-in-your-class/)
 * Very good ideas…
    Well written ! Just a question: Inside your class, why do you
   use a too complicate `load_languages` function ? If you read `load_plugin_textdomain`,
   you will see that `locale` value is tested and after languages and plugin sub-
   folder… redundancy ? What do you target ?
 * [https://wordpress.org/plugins/customizer-remove-all-parts/](https://wordpress.org/plugins/customizer-remove-all-parts/)

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

 *  Plugin Contributor [peterdog](https://wordpress.org/support/users/peterdog/)
 * (@peterdog)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/load_languages-function-in-your-class/#post-6263957)
 * We plan on getting the ONE line of language translated. There is code if someone
   stumbles upon the customizer.php URL that says it’s been disabled.
 * Does that answer your question or am I missing the boat?
 *  Thread Starter [Michel – xiligroup dev](https://wordpress.org/support/users/michelwppi/)
 * (@michelwppi)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/load_languages-function-in-your-class/#post-6264127)
 * From my little boat 😉 after tests…
 * I agree about the only line of message but not on 13 lines to do the same thing
   as these 3 lines if you don’t need vars or specific filters:
 *     ```
       public function load_languages() {
       load_plugin_textdomain( 'wp-crap',  false,  'customizer-remove-all-parts/languages' );
       }
       ```
   
 * `load_plugin_textdomain` function will also tests presence of translation files
   in WP_LANG_DIR if not in plugin’s language sub-folder !
 * Cheers
 *  Plugin Contributor [Parallelus](https://wordpress.org/support/users/parallelus/)
 * (@parallelus)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/load_languages-function-in-your-class/#post-6264142)
 * It was code copied from an existing project to save time. It’s a more expanded
   way of doing the same thing, but the end result is the same. It shouldn’t impact
   the result to change it.
 * We wrote this during lunch breaks so I pulled from existing code to save time.
   If it’s a performance gain to change it, that I’m in favor of doing. Any idea
   if that’s the case?
 *  Plugin Contributor [Parallelus](https://wordpress.org/support/users/parallelus/)
 * (@parallelus)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/load_languages-function-in-your-class/#post-6264143)
 * Oh, I think it posted that comment twice. Sorry about that if it did.
 *  Plugin Contributor [peterdog](https://wordpress.org/support/users/peterdog/)
 * (@peterdog)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/load_languages-function-in-your-class/#post-6264166)
 * We really appreciate you looking at this. We consulted others and the consensus
   is that our code is as good or better because we have filters.
 * It’s also very similar to EDD. Ours: [http://ow.ly/P7gvQ](http://ow.ly/P7gvQ)
   EDD: [http://ow.ly/P7gFY](http://ow.ly/P7gFY)
 * I’ll mark this topic closed now.

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

The topic ‘load_languages function in your class’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/customizer-remove-all-parts_797a7e.
   svg)
 * [Customizer Remove All Parts](https://wordpress.org/plugins/customizer-remove-all-parts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/customizer-remove-all-parts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/customizer-remove-all-parts/)
 * [Active Topics](https://wordpress.org/support/plugin/customizer-remove-all-parts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/customizer-remove-all-parts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/customizer-remove-all-parts/reviews/)

## Tags

 * [get_locale](https://wordpress.org/support/topic-tag/get_locale/)
 * [textdomain](https://wordpress.org/support/topic-tag/textdomain/)

 * 5 replies
 * 3 participants
 * Last reply from: [peterdog](https://wordpress.org/support/users/peterdog/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/load_languages-function-in-your-class/#post-6264166)
 * Status: resolved