You can test out this extension right away!
-
Go to your Cloud Firestore dashboard in the Firebase console.
-
If it doesn't exist already, create a collection called
${param:COLLECTION_PATH}
. -
Create a document with a field named
${param:INPUT_FIELD_NAME}
, then make its value a word or phrase that you want to translate. -
In a few seconds, you'll see a new field called
${param:OUTPUT_FIELD_NAME}
pop up in the same document you just created. It will contain the translations for each language you specified during installation.
This extension translates the input string(s) into your specified target language(s); the source language of the string is automatically detected. If the ${param:INPUT_FIELD_NAME}
field of the document is updated,
then the translations will be automatically updated as well.
Write the string "My name is Bob" to the field ${param:INPUT_FIELD_NAME}
in ${param:COLLECTION_PATH}
will result in the following translated output in ${param:OUTPUT_FIELD_NAME}
:
{
${param:INPUT_FIELD_NAME}: 'My name is Bob',
${param:OUTPUT_FIELD_NAME}: {
de: 'Ich heiße Bob',
en: 'My name is Bob',
es: 'Mi nombre es Bob',
fr: 'Je m'appelle Bob',
},
}
Create or update a document in ${param:COLLECTION_PATH}
with the field ${param:INPUT_FIELD_NAME}
value like the following:
{
first: "My name is Bob",
second: "Hello, friend"
}
will result in the following translated output in ${param:OUTPUT_FIELD_NAME}
:
{
${param:INPUT_FIELD_NAME}: {
first: "My name is Bob",
second: "Hello, friend"
},
${param:OUTPUT_FIELD_NAME}: {
first:{
de: "Ich heiße Bob",
en: "My name is Bob",
es: "Mi nombre es Bob",
fr: "Je m'appelle Bob",
},
second:{
de: "Hallo Freund",
en: "Hello, friend",
es: "Hola amigo",
fr: "Salut l'ami",
},
},
}
As a best practice, you can monitor the activity of your installed extension, including checks on its health, usage, and logs.