adapted call for locale dir and theme dir