Skip to content Skip to sidebar Skip to footer

Orbeon Form Localization Using Current Site's Session Language

I'm using ORBEON 2018.2.3.201905172253 PE within SAP Commerce (Hybris). From Orbeon documentation and the tests I've run, I understand forms localization works through a language d

Solution 1:

You can extend de.hybris.platform.xyformsservices.proxy.impl.DefaultProxyServicerewriteURL method and pass Orbeon the user language, something like this:

URIBuilderbuilder=null;
        try
        {
            builder = newURIBuilder(this.orbeonAddress + path);
        }
        catch (final URISyntaxException e)
        {
            LOG.error("Error occurred while building the URL : " + e);
            thrownewMalformedURLException(e.getMessage());
        }

        // if the original URl had a QueryString...
        builder.setQuery(u.getQuery());

        // If the form should be embeddableif (embeddable)
        {
            builder.addParameter("orbeon-embeddable", "true");
            builder.addParameter("fr-language", getCommonI18NService().getCurrentLanguage().getIsocode());
        }

        finalStringnewURL= builder.toString();

        LOG.debug("Rewritten URL [" + newURL + "]");
        return newURL;

Hope it helps

Post a Comment for "Orbeon Form Localization Using Current Site's Session Language"