Skip to content

Instantly share code, notes, and snippets.

@mythosil
Created September 10, 2011 06:07
Show Gist options
  • Save mythosil/1207998 to your computer and use it in GitHub Desktop.
Save mythosil/1207998 to your computer and use it in GitHub Desktop.
disable the localization of dirname in macosx
#
# Description:
# Disable the localization of directory' name in Mac OS X.
#
use strict;
use warnings;
my $home = $ENV{'HOME'};
my @directories = (
"$home/Desktop",
"$home/Documents",
"$home/Pictures",
"$home/Downloads",
"$home/Music",
"$home/Movies",
"$home/Sites",
"$home/Public",
"$home/Library",
"/Applications"
);
for my $d (@directories) {
my $old = $d . "/.localized";
my $new = $old . ".disable";
if (-e $old) {
rename $old, $new;
print "Disabled the localization for $d.\n";
} else {
print "Localization for $d has already disabled.\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment