Load a locale from /usr/local/share/locale in OS X While importing a PostgreSQL database in OS X 10.10, I got a error like "invalid locale name: en_US.utf8". I went to /usr/share/locale and copied the folder en_US.UTF-8 as en_US.utf8. Ok, problem solved.

But I know this solution will not work in OS X 10.11 due to that "rootless mode". I'll not be able to modify /usr/share/locale.

Is there any way to load this folder from /usr/local/share/locale? I tried to copy en_US.utf8 to that directory and it didn't work.
This worked for me (macos 10.14):

sudo localedef -i /usr/share/locale/en_US.UTF-8 /usr/local/share/locale/en_US.utf8
sudo cp /usr/share/locale/en_US.UTF-8/LC_COLLATE /usr/local/share/locale/en_US.utf8/