If I have a language and a region dimension, this is ignored in the Locale at the moment.
See Packages/Application/Neos.Neos/Classes/View/FusionView.php
public function render()
{
$currentNode = $this->getCurrentNode();
$currentSiteNode = $currentNode->getContext()->getCurrentSiteNode();
$fusionRuntime = $this->getFusionRuntime($currentSiteNode);
$dimensions = $currentNode->getContext()->getDimensions();
if (array_key_exists('language', $dimensions) && $dimensions['language'] !== []) {
$currentLocale = new Locale($dimensions['language'][0]);
$this->i18nService->getConfiguration()->setCurrentLocale($currentLocale);
$this->i18nService->getConfiguration()->setFallbackRule(['strict' => false, 'order' => array_reverse($dimensions['language'])]);
}
$fusionRuntime->pushContextArray([
'node' => $currentNode,
'documentNode' => $this->getClosestDocumentNode($currentNode) ?: $currentNode,
'site' => $currentSiteNode,
'editPreviewMode' => isset($this->variables['editPreviewMode']) ? $this->variables['editPreviewMode'] : null
]);
try {
$output = $fusionRuntime->render($this->fusionPath);
$output = $this->mergeHttpResponseFromOutput($output, $fusionRuntime);
} catch (RuntimeException $exception) {
throw $exception->getPrevious();
}
$fusionRuntime->popContext();
return $output;
}
and Packages/Application/Neos.Seo/Resources/Private/Fusion/Metadata/LangAttribute.fusion
prototype(Neos.Seo:LangAttribute) < prototype(Neos.Fusion:Value) {
value = ${String.replace(documentNode.context.dimensions.language[0], '_', '-')}
@if.languageDimensionExists = ${Configuration.setting('Neos.ContentRepository.contentDimensions.language') != null}
@if.onlyRenderWhenInLiveWorkspace = ${node.context.workspace.name == 'live'}
}
Is there a reason to not make this configurable?