Hi team,
I have a multilang site (WPML), 3 locales.
There is a taxonomy (product line) archive layout that provides structure to all product lines.
This layout has inner JSON-LD, templated to show dynamically the present context (taxonomy, locale).
Assume this JSON-LD fragment:
“@type”: [“Thing”,“skos:Concept”],
“name”: [
{
“@value”: “Los productos de esta línea contribuyen en {{dc:term:name}}”,
“@language”: “es”
},
{
“@value”: “Os produtos desta linha contribuem para {{dc:term:name}}”,
“@language”: “pt-pt”
},
{
“@value”: “Products in this product line contribute to {{dc:term:name}}”,
“@language”: “en”
}
]
Assume I want this Schema no matter the locale version I’m browsing:
- It is not showing the ES label when browsing ES locale
- It is showing the 3 localized labels no matter the locale browsing.
In practice, if I’m on the Spanish archive, this fragment will get me:
- Los productos de esta línea contribuyen en Salud Ocular
- Os produtos desta linha contribuem para Salud Ocular
- Products in this product line contribute to Salud Ocular
Then switch to PT and will read “Saúde Ocular” on the 3 spots, switch EN for 3x “Eye Health”.
How do I get each {{dc:term:name}} localized to its own language independently of the locale context?
I want to get coherent value labels like this, I.ex.
- Los productos de esta línea contribuyen en Salud Ocular
- Os produtos desta linha contribuem para Saúde Ocular
- Products in this product line contribute to Eye Health
I need workaround or a property like {{dc:term:name locale=“es”}}
If this is not feasible without complexity, I’d turn this into a request for developing the “magic property”, similar to sizes in {{dc:post:featured_image size=“medium”}}, applied onto available locales.
Thank you for your attention, happy weekend