Multilingual Translate Data Returned From The Database
In this document we will demonstrate how it is possible to translate text that is held in a specific language within your database into a different language.
We will demonstrate how it is possible to filter or colour charts, tables and categories even when the actual data is in a different language.
In this example we are going to use months of the year as an example.
So I’ve created an object which returns the Month (footfall month - when did customers visit my Store).
I can create a chart from this data.
Now I’d like to colour August in Blue as it’s when my birthday is.
Now I have Portuguese users so I want the to see the months as
January=Janeiro
February=fevereiro
March=Março
April=Abril
May=Maio
June=Junho
July=Julho
August=Agosto
September=Setembro
October=Outubro
November=Novembro
December=Dezembro
So we create a file named messagesUserEntered_pt_PT.properties
Which contains the following
Then upload it
Then I am going to log back in, in Portuguese
My chart will now be in Portuguese
Note to make it complete I’ll add my object names and chart title to the messagesData_pt_PT.properties file
Footfall By Month=Movimento por mês
Footfall Month=Mês de passos
Customer Visits=Visitas de clientes
and upload it…
NOTE: you do not need to alter any filters / colours etc. It uses the base language to apply the colours or filters.
For example for colours,
Or for filters
The end user can select filters now in their language, but the filters are applied in the base language
without the need for any additional transformations.
If you have applied your own methods - with DB field translations or index values - these will continue to work. However using the catalog file is a much simpler way of translating.