Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Format setting for Farsi (Arabic) numbers

$
0
0

Hi dear Dash community,
Is there any option to show numbers in Farsi (Arabic) in a dash datatable?
I am using DataTable like below in a dbc.Container :

    dbc.Row(
            dbc.Col(
                dash_table.DataTable(  # ---------------------------------------------------------
                    id="datatable-Rates",
                    columns=[
                        dict(id=i, name=j, editable=m, type=l, format=k)
                        for i, j, k, l, m in zip(
                            Rates_columns[::-1],
                            Rates_names[::-1],
                            Rates_formats[::-1],
                            Rates_types[::-1],
                            Rates_editable[::-1],
                        )
                    ],
                    data=Rates.to_dict("records"),  # the contents of the table
                    # filter_action="native",
                    sort_action="native",
                    selected_rows=[],
                    sort_mode="single",
                    style_cell={
                        "minWidth": 35,
                        "width": 370,
                    },
                    fill_width=False,
                    style_cell_conditional=[  # align text columns to left. By default they are aligned to right
                        {"if": {"column_id": c}, "textAlign": "center"} for c in Rates.columns
                    ],
                    style_data_conditional=[  # 125, 181, 178
                        {
                            "if": {"column_editable": False},
                            "backgroundColor": cell_background_color,
                            "color": cell_background_editable,
                        }
                    ],
                    style_data={
                        "whiteSpace": "normal",
                        "height": "auto",
                        "border": "none",
                        "border-bottom": "1px solid #ccc",
                    },  
                    style_header={"backgroundColor": header_background_color, "color": "white"},
                ),
            ),
        ),

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles