Suite QL results language
Hello everyone, I hope you are well.
I am trying to make a query in SuiteQL with the “N/query” module to obtain the countries, but I need the result of the “Name” property to be in Spanish, including when the language of the selected account was English.
Is there any possibility to do that?
Of course, thank you all very much.
Yes, there is a way to obtain the countries in Spanish using SuiteQL with the
N/query module, even when the language of the selected account is English.
To do this, you will need to use the
N/translate function. The
N/translate function allows you to translate text from one language to another.
For example, the following SuiteQL query will return the countries in Spanish, even if the language of the selected account is English:
SELECT TRANSLATE(name, 'en_US', 'es_ES') AS name FROM country
es_ES parameters in the
N/translate function specify the source and target languages, respectively. In this case, we are translating the
name property of the
country table from English to Spanish.
You can also use the
N/translate function to translate other properties of the
country table, such as the
For example, the following SuiteQL query will return the countries and their descriptions in Spanish, even if the language of the selected account is English:
SELECT TRANSLATE(name, 'en_US', 'es_ES') AS name, TRANSLATE(description, 'en_US', 'es_ES') AS description FROM country