Question

Use different locales for each timeframes

  • 14 June 2022
  • 2 replies
  • 546 views

Greetings!

 

I am currently applying a locale to my dashboards. Everything is working fine, except for that.

 

I have a datetime dimension like this: 

  dimension_group: issue_date {
    type: time
    label: “issue_date”
    timeframes: [
      raw,
      time,
      date,
      hour,
      week,
      month,
      quarter,
      year
    ]
    datatype: datetime
    sql: ${TABLE}.issue_date ;;
  }

 

This dimension is used in some charts, in multiple timeframes.

I wanted to apply locale to each timeframe (e.g. `month` should be `mes` and `year`should be `ano`). Is that possible?

 


2 replies

I’m also facing this issues.

Creating separate dimensions will fix the localization issue but it will also break all the reports that are using the dimension_group so it’s not a good option.

 

 

 

Userlevel 7
Badge +1

I think you’ll have to create those dimensions separately, in order to apply labels, like

dimension: issue_year {

  type: date_year / date_week / date_month

}

Reply