Solved

Excel Multi language dictionary

  • 22 September 2020
  • 1 reply
  • 20 views

Badge +1

Hi everyone

 

I have an interesting question, and looking for some inspiration or advice to a problem I would like to solve. I thought I would ask the question before the FME Webinar on Excel that will be this Thursday (24.09.2020)

 

There are a few workspaces that I need to adapt for multiple languages (English, German, French). The result is that all my outputs should be adapted for the language, meaning all texts and even the header in documents should be edited. 

 

My workflow is as follows: GoogleForms csv Input > FME Desktop Transformers > HTML Output

 

As an example

In JSON one would build a multiple language dictionary like this:

 

var arrLang = {
    "en-gb": {
        "HOME": "Home",
        "ABOUT": "About Us",
        "CONTACT": "Contact Us",
    },
    "zh-tw": {
        "HOME": "首頁",
        "ABOUT": "關於我們",
        "CONTACT": "聯絡我們",
    }
};  

I am pondering what the best way to do this for my FME Workspaces. In my attached excel, I have used Lists to achieve a similar result, but how can I control the Features (Column Headers) language in my HTML? I need to keep all my feature and types as dynamic as possible, so I assume I have to define them all before hand in the different languages.

 

Here is a workspace example:

 

Multilanguage FME Example

 

HTML Headers are tedious to add in excel Config table and the ones in yellow I haven't edited. 

 

HTML Report Example

Would it make sense to rather use a JSON Language table to create a dynamic input?

I do not want to make a super complex excel config table if there are easier solutions out there. 

 

Attached: FME workspace + excel tables and html report

 

Cheers 

Fred

 

icon

Best answer by mark2atsafe 29 September 2020, 00:42

View original

1 reply

Userlevel 4
Badge +25

I just saw this question and though I don't have time to go into detail right now, I think a SchemaMapper transformer would be a good idea. 

So you would create a lookup table as a CSV file:

"en-gb","HOME","Home"
"en-gb","ABOUT","About Us"
"en-gb","CONTACT","Contact Us"
"zh-tw","HOME","首頁"
"zh-tw","ABOUT","關於我們"
"zh-tw","CONTACT","聯絡我們"

And then point the SchemaMapper to use that file. You should be able to find examples on this site showing how to rename attributes from one name to another with this transformer.

Reply