Title: wp-includes/l10n/class-wp-translation-controller.php | Developer.WordPress.org

---

# File: wp-includes/l10n/class-wp-translation-controller.php

 * method[WP_Translation_Controller::has_translation()](https://developer.wordpress.org/reference/classes/wp_translation_controller/has_translation/)
 * Returns a boolean to indicate whether a translation exists for a given string
   with optional text domain and locale.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/has_translation/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_translation_controller/has_translation/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:448](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L448-L454)
 * method[WP_Translation_Controller::locate_translation()](https://developer.wordpress.org/reference/classes/wp_translation_controller/locate_translation/)
 * Locates translation for a given string and text domain.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/locate_translation/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/locate_translation/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:397](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L397-L419)
 * method[WP_Translation_Controller::get_files()](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_files/)
 * Returns all translation files for a given text domain.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_files/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_files/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:430](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L430-L436)
 * method[WP_Translation_Controller::normalize_header()](https://developer.wordpress.org/reference/classes/wp_translation_controller/normalize_header/)
 * Normalizes header names to be capitalized.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_translation_controller/normalize_header/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/normalize_header/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:354](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L354-L358)
 * method[WP_Translation_Controller::get_entries()](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_entries/)
 * Returns all entries for a given text domain.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_entries/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_entries/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:368](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L368-L380)
 * method[WP_Translation_Controller::translate()](https://developer.wordpress.org/reference/classes/wp_translation_controller/translate/)
 * Translates a singular string.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/translate/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_translation_controller/translate/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:263](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L263-L275)
 * method[WP_Translation_Controller::translate_plural()](https://developer.wordpress.org/reference/classes/wp_translation_controller/translate_plural/)
 * Translates plurals.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/translate_plural/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_translation_controller/translate_plural/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:297](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L297-L320)
 * method[WP_Translation_Controller::get_headers()](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_headers/)
 * Returns all existing headers for a given text domain.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_headers/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_headers/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:330](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L330-L344)
 * method[WP_Translation_Controller::load_file()](https://developer.wordpress.org/reference/classes/wp_translation_controller/load_file/)
 * Loads a translation file for a given text domain.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/load_file/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_translation_controller/load_file/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:101](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L101-L144)
 * method[WP_Translation_Controller::unload_file()](https://developer.wordpress.org/reference/classes/wp_translation_controller/unload_file/)
 * Unloads a translation file for a given text domain.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_translation_controller/unload_file/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/unload_file/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:156](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L156-L190)
 * method[WP_Translation_Controller::unload_textdomain()](https://developer.wordpress.org/reference/classes/wp_translation_controller/unload_textdomain/)
 * Unloads all translation files for a given text domain.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/unload_textdomain/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/unload_textdomain/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:201](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L201-L232)
 * method[WP_Translation_Controller::is_textdomain_loaded()](https://developer.wordpress.org/reference/classes/wp_translation_controller/is_textdomain_loaded/)
 * Determines whether translations are loaded for a given text domain.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/is_textdomain_loaded/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/is_textdomain_loaded/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:243](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L243-L250)
 * class[WP_Translation_Controller](https://developer.wordpress.org/reference/classes/wp_translation_controller/)
 * Class WP_Translation_Controller.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:15](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L15-L455)
 * method[WP_Translation_Controller::get_instance()](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_instance/)
 * Utility method to retrieve the main instance of the class.
 * Used by [4 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_instance/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_instance/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:61](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L61-L67)
 * method[WP_Translation_Controller::get_locale()](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_locale/)
 * Returns the current locale.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_locale/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/get_locale/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:76](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L76-L78)
 * method[WP_Translation_Controller::set_locale()](https://developer.wordpress.org/reference/classes/wp_translation_controller/set_locale/)
 * Sets the current locale.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/set_locale/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_translation_controller/set_locale/#uses)
   | Source: [wp-includes/l10n/class-wp-translation-controller.php:87](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/l10n/class-wp-translation-controller.php#L87-L89)