protected void encodeLocaleResources(FacesContext context, PrimeConfiguration configuration) {
        if (!configuration.isClientSideLocalizationEnabled()) {
            return;
        }

        try {
            final Locale locale = LocaleUtils.getCurrentLocale(context);
            ResourceUtils.addJavascriptResource(context, "locales/locale-" + locale.getLanguage() + ".js");
        }
        catch (FacesException e) {
            if (context.isProjectStage(ProjectStage.Development)) {
                LOGGER.log(Level.WARNING, "Failed to load client side locale.js. {0}", e.getMessage());
            }
        }
    }
Renders head content based on the following order
- First Facet
- Theme CSS
- PrimeIcons CSS
- Middle Facet
- Registered Resources
- Client Validation Scripts
- Locales
- PF Client Side Settings
- PF Initialization Scripts
- Head Content
- Last Facet
primefaces/src/main/java/org/primefaces/renderkit/HeadRenderer.java