Mutlilanguage fields not getting translation

Hey there,
I’m having an issue translating the fields in my templates.
The default language is French, but all fields get the EN version on both the French and English panel view.
Any ideas why is not giving me the fr when fr is selected?

fields:
  title:
    label: 
      fr: Title
      en: Title EN
    type:  text

  city:
    label:
      fr: City 
      en: City EN
    type: text
    width: 1/2
    required: true
  
  postCode:
    label:
      fr: Post Code
      en: Post Code EN
    type: text
    width: 1/2
    required: true

I assume you are talking about the translated labels? The labels do not change if you change the language in the upper right corner. They change when you change the user language, which makes sense because you want the user to understand what to fill into a given field, right?

Indeed makes sense.
But so these labels could also be used as content variables right?
For example, I have :

City: Paris and on the french version I could somehow echo the fr version: La Ville: Paris ?

On the frontend? The you would have to parse the blueprints. That’s not possible out of the box, but there are plugins.

Yes, there are some areas where the field label is needed on the front end. Or maybe I could use some sort of if else to check for current language and replace the label (hard coded “title”) without accessing the blueprints?

For this sort if stuff, I wouldn’t read the blueprints but use language variables.

In your template, you would then use something like

echo l('city');
1 Like