It is the recommended way of localizing your Python applications and modules. This function implements the standard .mo file search algorithm.
All arguments are strings.
If localedir is not given, then the default system locale directory is used. The first one returning a non-empty value is used for the languages variable. The environment variables can contain a colon separated list of languages, which will be split. If no such file is found, then None is returned. Instances with identical .mo file names are cached.