The current locale is what tells the application in what language it should display its strings. We use this information in an external file to find out what strings to expect.

This script gets a parameter --app with a value 'calculator' or 'notepad' or 'notepad_menu' just to be able to return the appropriate strings in the current language. For example: perl locale.pl --app calculator

examples/Win32GUI/locale.pl
use strict;
use warnings;

# locale string for the Calculator on Windows

use POSIX qw(locale_h);
use Getopt::Long;

my $application;
GetOptions("app=s" => \$application);
my $locale = setlocale(LC_CTYPE);

if (not $application) {
    print "The current locale is $locale\n";
} elsif ($application eq "calculator") {
    if ($locale eq "Hebrew_Israel.1255") {
        print "îçùáåï";
    } else {
        print "Calculator";
    }
} elsif ($application eq "notepad") {
    if ($locale eq "Hebrew_Israel.1255") {
        print "ôð÷ñ øùéîåú";
    } else {
        print "Notepad";
    }
} elsif ($application eq "notepad_menu") {
    if ($locale eq "Hebrew_Israel.1255") {
        print "÷åáõ|éöéàä";
    } else {
        print "File|Exit";
    }
}