How to edit Age Group String

Age Groups
There are 4 Age Groups as shown below:

  1.   Adult (18+)
  2.  Child (7-17)
  3.  Infant(0-7)
  4.  Senior Citizens (65+)

These are basic wordpress strings, like any other text strings in theme, that can be easily changed using any translator plugin like Polylang – WordPress plugin | or others.

However, if you do not want to use the plugin and edit strings manually, you can copy and paste the code below into your Emprise Child Themes functions.php file and replace ABC, DEF, GHI, JKL with your preferred text string for those values:

function custom_text_replace( $translated_text, $untranslated_text, $domain ) {
    switch ( $untranslated_text ) {
        case 'Adult (18+)':
            $translated_text = __( 'ABC', $domain );
        case 'Child (7-17)':
            $translated_text = __( 'DEF', $domain );
        case 'Infant(0-7)':
            $translated_text = __( 'GHI', $domain );
		case 'Senior Citizens (65+)':
			$translated_text = __( 'JKL', $domain );
        // Leave the default case out when using languages other than en_US
            $translated_text = $untranslated_text;
    return $translated_text;
add_filter( 'gettext', 'custom_text_replace', 20, 3 );

Please feel free to ask if you need any further help with this or want me to do this for you.

Thank you