Localization of GoogleSheetsCMS content!


#1

Hi Everyone,
I’d like to pass a locale string, such as “fr-FR” onto the config.js, so I can access specific information from GoogleSheetsCMS. The description in JOVO docs (https://www.jovo.tech/marketplace/jovo-cms-googlesheets#platform-specific-responses) is awfully thin. Can someone give me some tips?

Thank you very much!
Dan


#2

Hi @Terafitz, welcome to the Jovo community :tada:

You can find a bit of information here in the docs about the default response sheet type: https://www.jovo.tech/marketplace/jovo-cms-googlesheets#responses

Add additional locales by adding another column with the name of the locale, e.g. fr-FR. No need to edit the config.


#3

Ok thanks, I’ll give it a test immediately. I also have another sheet in the table which also has multiple columns, such as “fallback”, “reprompt”, “back” and “restart”.

Can I rename each column as well, like this: “fallback_en-US”, “reprompt_en-US”, “back_en-US” and “restart_en-US” ?

best
Dan


#4

Currently, i18n is only supported for our built-in responses sheet type which only includes a key column and then locale-specific or platform-specific columns.

The sheet that you have with multiple columns could probably be localized by adding your own custom sheet type: https://www.jovo.tech/marketplace/jovo-cms-googlesheets#defining-your-own-sheet-type

You could take a look at the existing responses sheet type and customize it to your needs: https://github.com/jovotech/jovo-framework/blob/master/jovo-integrations/jovo-cms-googlesheets/src/ResponsesSheet.ts