Creating and Configuring a Project » Creating a production project » Enabling data internationalization through SQL queries

Enabling data internationalization through SQL queries

If you have configured your data source to use tables and columns to identify your internationalized data, you can define your MicroStrategy project to create SQL queries to return data in the required languages. The SQL queries are automatically generated to return the information in a user’s selected language based on the tables and columns you identify as containing translated data.

For information on configuring your data source to use tables and columns to identify translated data, see Internationalization through tables and columns or databases.

To enable data internationalization through SQL queries, you must define the tables and columns used for your internationalized data, as described in the procedure below.

Prerequisites

A project has been created.

To enable data internationalization through SQL queries

1 In MicroStrategy Developer, log in to a project.
2 Right-click the project and select Project Configuration. The Project Configuration Editor opens.
3 In the Categories list, expand Languages, and then select Data.
4 Select the Enable data internationalization check box, and then select the SQL based option.
5 Select the check box next to a language to include it as a language enabled for translated data.

To add other languages to enable data internationalization, perform the steps below:

a Click Add. The Available Languages dialog box opens.
b Clear the Display metadata languages only check box.
c Select the check box for languages to enable for data internationalization and click OK to return to the Project Configuration Editor.
6 For each language, include suffixes for the columns and tables that contain your translated data.

Click ... in the Column Pattern for a language, to include suffixes for columns. Click ... in the Table Pattern for a language, to include suffixes for tables. For example, if your data source includes Spanish data in columns that end in _ES, type _ES in the Column Pattern.

The Column Pattern and Table Pattern options expect suffixes to identify your internationalized columns and tables. If you use prefixes or other naming conventions, you can use the functions listed below to identify the columns and tables that contain translated data:

LStrCut(string s, integer x): Removes x characters from the beginning of the character string s, and returns the remaining character string. For example, LStrCut(“Apple”,2) would return ple.
RStrCut(string s, integer x): Removes x characters from the end of the character string s, and returns the remaining character string. For example, RStrCut(“Apple”,2) would return App.
Concat(string s1, string s2): Appends the character string s2 to the end of the character string s1, and returns the resulting character string. For example, Concat(“App”,”le”) would return Apple.

The functions listed above can be used together to support various column and table naming conventions. You can use the parameter #0 to pass the column or table name into the function. To support a prefix rather than a suffix you can use the syntax listed below:

Concat(“Prefix”,#0)

For example, to use a prefix of ES_ to identify columns that contain Spanish data, you can use the syntax listed below:

Concat(“ES_”,#0)

7 Click OK to save your changes and close the Project Configuration Editor.

Enabling data internationalization through connection mappings

You can support data internationalization in your database by using separate databases for each translation. A user can then be granted access, through connection mappings, to the database that contains their preferred language.

For information on configuring your data source to use separate databases and connection mappings to identify internationalized data, see Internationalization through tables and columns or databases.

To enable data internationalization through separate databases and connection mappings, you must define the databases used for each language, as described in the procedure below.

Prerequisites

A project has been created.

To enable data internationalization through separate databases and connection mappings

1 In MicroStrategy Developer, log in to a project.
2 Right-click the project and select Project Configuration. The Project Configuration Editor opens.
3 In the Categories list, expand Languages, and then select Data.
4 Select the Enable data internationalization check box, and then select the Connection mapping based option.
5 Select the check box next to a language to include it as a language enabled for translated data.

To add other languages to enable data internationalization, perform the steps below:

a Click Add. The Available Languages dialog box opens.
b Clear the Display metadata languages only check box.
c Select the check box for languages to enable for data internationalization and click OK to return to the Project Configuration Editor.
6 For each language, from the Database Connection drop-down list, select a database connection to use for the language. The database connection determines the data source that stores the translated data and the login information to connect to the data source. You can leave this drop-down list blank to use the database connection for the default database instance of the project.
7 Click OK to save your changes and close the Project Configuration Editor.