Add documentation to the getLocale method.
Move configuration into its own file.