I have made a dashboard in Plotly Dash. Everything looks perfect, however the main problem I am facing is that of localization(translating the elements in Dashboard to other language). Without translating, the dashboard will be worthless. I have tried following method for translating the elements:
@app.callback(
Output('1', 'children' ),
Output('2', 'children' ),
Input("lang-dropdown", "value"))
def update_card(value):
if value=='Ar':
return 'مقارنة المبيعات', 'ضبط المبيعات'
else:
return 'Sales Comparison', 'Sales Tuning'
However, there are lot of elements and I want it to translate it more efficiently like that used in other language(like in json format). I have looked into other methods like Flask Babel translating as well, but I am a beginner and it is difficult for me to do it at this stage. Can someone please guide me how can I localize my dashboard? Will be grateful.