- if (aul_app_get_pkgname_bypid(pid, pkg_name, PKGNAME_MAX) != AUL_R_OK)
- return -1;
-
- r = snprintf(dirname, PATH_MAX, "%s/%s" PATH_RES PATH_LOCALE,
- PATH_APP_ROOT, pkg_name);
- if (r < 0)
- return -1;
- if (access(dirname, R_OK) == 0)
- return 0;
- r = snprintf(dirname, PATH_MAX, "%s/%s" PATH_RES PATH_LOCALE,
- PATH_SYS_RO_APP_ROOT, pkg_name);
- if (r < 0)
- return -1;
- if (access(dirname, R_OK) == 0)
- return 0;
- r = snprintf(dirname, PATH_MAX, "%s/%s" PATH_RES PATH_LOCALE,
- PATH_SYS_RW_APP_ROOT, pkg_name);
- if (r < 0)
+ snprintf(locale_dir, size, "%s" PATH_LOCALE, res_path);
+ if (access(locale_dir, R_OK) != 0)