English
, en-US
, or en-GB
.
es-ES
for Spanish.# Gets the Spanish variant of an article
query GetArticleInSpanish {
article(codename: "about_us", languageFilter: {languageCodename: "es-ES"}) {
title
# other elements
}
}
# Filters all articles to find the Spanish variant by its URL slug
query GetArticlesByLocalizedSlug {
article_All(where: {title: {eq: "acerda-de-nosotros"}}, languageFilter: {languageCodename: "es-ES"}) {
items {
title
# other elements
}
}
}
# Gets content items in Spanish without following language fallbacks
query GetArticlesInSpanishOnly {
article_All(
# Requests items in Spanish
languageFilter: {languageCodename: "es-ES"},
# Filters the items so that only Spanish is returned
where: {_system_: {language: {_system_: {codename: {eq: "es-ES"}}}}}) {
items {
title
# other elements
}
}
}