def METHOD_NAME(self, pm):
    linguas = self.d.getVar("SDKIMAGE_LINGUAS")
    if linguas:
        import fnmatch
        # Install the binary locales
        if linguas == "all":
            pm.install_glob("nativesdk-glibc-binary-localedata-*.utf-8", sdk=True)
        else:
            pm.install(["nativesdk-glibc-binary-localedata-%s.utf-8" % \
                       lang for lang in linguas.split()])
        # Generate a locale archive of them
        target_arch = self.d.getVar('SDK_ARCH')
        rootfs = oe.path.join(self.sdk_host_sysroot, self.sdk_native_path)
        localedir = oe.path.join(rootfs, self.d.getVar("libdir_nativesdk"), "locale")
        generate_locale_archive(self.d, rootfs, target_arch, localedir)
        # And now delete the binary locales
        pkgs = fnmatch.filter(pm.list_installed(), "nativesdk-glibc-binary-localedata-*.utf-8")
        pm.remove(pkgs)
    else:
        # No linguas so do nothing
        pass