I am making a website in 3 languages (English, Kazakh, and Russian) with Kazakh being the default. It is a website for a publishing house, where users should be able to add publication issues and select categories or tags from the panel. I made a blueprint for each publication issue with different fields. I am having issues with the category radio field where they have to choose whether it’s a current or upcoming issue for example. The thing these categories should be translated depending on the language chosen, so we have the following in the blueprint:
categories:
label: Categories
type: radio
options:
current:
qaz: қазіргі
eng: current
rus: текущие
upcoming:
qaz: жақында
eng: upcoming
rus: предстоящие
And I’ve tried multiple things like renaming the language code or pasting custom translations into the languages files. None of it works, and I only get one language displayed and it’s the same language even if you switch languages.
Could you please advise?
Another issue is that this resulting category filter should be visible on the Publications page, to sort through current, past and upcoming publications. So can’t get it to work until the categories work too. Let me know if you need more information like links or screenshots.
The translation are shown depending on user language, not translation language, also, your language codes are not correct, should be existing codes like en, ru
Hi thank you @texnixe!
The translations are not shown for me unfortunately depending on user language, even when I switch them. Or do you mean by user language the language of the panel itself?
When I use existing codes it doesn’t work either
Thank you @texnixe , don;t mean to bother more but it’s still not working, here’s what I have for the entire blueprint file as of now (if you scroll down you’ll see the categories field):
title: Publication
columns:
main:
width: 2/3
sections:
fields:
type: fields
fields:
description:
type: textarea
size: medium
price:
label: Price
type: text
page amount:
label: Page amount
type: text
cover type:
label: Cover type
type: text
paper type:
label: Paper type
type: text
publication size:
label: Publication size
type: text
sku:
label: SKU
type: text
featured:
label: Featured
type: pages
query: site.find('community')
categories:
label: Categories
type: radio
options:
current:
en: current
ru: текущие
ka: қазіргі
upcoming:
en: upcoming
ru: предстоящие
ka: жақында
sidebar:
width: 1/3
sections:
files:
type: files
And this is what I get for all three languages (when the user changes language):
Does the interface language matter? Can’t the interface be in English but the categories show up in different languages once the user selects the language of the website itself (not the panel interface)? Or is that not possible?
On top of that Kazakh language is missing from interface languages anyway
And if I am building a controller filter, and want to access this blueprint field (so that in frontend these categories would be translated when language is changed as well), should I do something like this? I am new to php sorry!
This will give you the field definition from the blueprint. To get the option, you would need to access the options from the field, then get the right language key.
I am definitely missing something because the options don’t change depending on the frontend language. Thanks for your patience so far. I just haven’t understood how to apply this specific situation from the forum or the videos/docs.
I basically have a sidebar filter with categories (and they are multilang) and then on the right i display the filtering results (which are the children of this publications page).
That’s why I have 2 foreach loops, one for the sidebar filter which filters the categories, and another for the publications grid.
Now the filter looks like this (i think the result of the below code is the names of filters under the clickable links) and doesn’t change per language still:
i am using the i18n folder for translations btw and they work perfectly in the panel with the programmable blueprint workaround but for some reason not working here in the frontend when i try to fetch them for this filter