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.DefaultProxyService
rewriteURL
method and pass Orbeon the user language, something like this:
URIBuilder builder = null;
try
{
builder = new URIBuilder(this.orbeonAddress + path);
}
catch (final URISyntaxException e)
{
LOG.error("Error occurred while building the URL : " + e);
throw new MalformedURLException(e.getMessage());
}
// if the original URl had a QueryString...
builder.setQuery(u.getQuery());
// If the form should be embeddable
if (embeddable)
{
builder.addParameter("orbeon-embeddable", "true");
builder.addParameter("fr-language", getCommonI18NService().getCurrentLanguage().getIsocode());
}
final String newURL = 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"