Created: 2017.04.08
The Text Domain is defined in style.css
:
/*
Theme Name: KB
Theme URI: http://kb.dotherightthing.co.nz
Author: Do The Right Thing
Author URI: http://www.dotherightthing.co.nz
Description: A template for useful code snippets and the accompanying documentation
Version: 0.2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kb
Tags: developer knowledgebase code wiki
*/
This value can be retrieved by querying the WP_Theme Object:
$my_theme = wp_get_theme();
echo $my_theme->get( 'TextDomain' ); // kb