What is Multilingual Data Support?

Localizing Oracle Business Intelligence 15-23 – The lookup key for lookup table ProductName_TRANS is both Product_code and Language_Key – The expressions in expression_list are SnowflakeSales.Product.ProductID and VALUEOFNQ_SESSION.LANGUAGE – The meaning of the lookup is: return the translated value of ProductName from the translation table with the condition of Product_code = SnowflakeSales.Product.ProductID and Language_Key = VALUEOFNQ_SESSION.LANGUAGE

15.6.5.4 Creating Logical Lookup Columns

You use the Expression Builder in the Administration Tool to create a logical column that includes the lookup function. The value of the logical column depends on the language that is associated with the current user. You create a new logical column using a derived column expression in the Column Source tab, for example to get the translated product name: INDEXCOL VALUEOFNQ_SESSION.LAN_INT, Translated Lookup Tables.Product. ProductName, LOOKUP DENSE Translated Lookup Tables.Product Translations. ProductName, Translated Lookup Tables.Product.ProductID, VALUEOFNQ_SESSION.WEBLANGUAGE LAN_INT is a session variable that is populated by the session initialization block MLS and represents either the base language or other languages: ■ 0 for base language for example, en - English ■ 1 for other language codes for example, fr - French, or cn - Chinese WEBLANGUAGE is a session variable that is initialized automatically, based on the language selected when a user logs in. The INDEXCOL function helps to select the appropriate column. In the preceding example, the expression returns the value of the base column ProductName only if the user language is the base language that is, when the value of session variable LAN_INT is 0. If the user language is not the base language when the value of the session variable LAN_INT is 1, then the expression returns the value from the lookup table of the language that is passed in the WEBLANGUAGE session variable. When you use the DENSE function shown in the previous example, if there is no value for a column in the translated language, then the lookup function displays a blank entry. When you use the SPARSE function shown in the following example, and there is no value for a column in the translated language, then the lookup function displays a corresponding value in the base language. INDEXCOL VALUEOFNQ_SESSION.LAN_INT, Translated Lookup Tables.Product. ProductName, LOOKUP SPARSE Translated Lookup Tables.Product Translations. ProductName, Translated Lookup Tables.Product.ProductName, Translated Lookup Tables.Product.ProductID, VALUEOFNQ_SESSION.WEBLANGUAGE 15-24 System Administrators Guide for Oracle Business Intelligence Enterprise Edition Handling Non-ISO Type Language Codes If the data has non-ISO type language codes in the tables, then there should be a table that maps ISO language codes to non-ISO language codes. You can use the preexisting WEBLANGUAGE variable that sets the ISO language code when a user logs in. You define a separate LANGUAGE variable whose initialization block runs a query against a mapping table to fetch the non-ISO language code filtered by the value from the WEBLANGUAGE variable. Table 15–3 provides a mapping table for non-ISO language codes. LANGUAGE is a non-ISO language code.

15.6.6 Creating Physical Lookup Tables and Physical Lookup Columns

You can create physical lookup table objects in the business model to define the necessary metadata for translation lookup tables. Physical lookup tables are similar to logical lookup tables in both semantics and usage. Physical lookup tables address the following scenarios that logical lookup tables cannot handle: ■ The lookup table source is fragmented. In this case, use multiple physical lookup tables to hold the values. For example, translation values for fragmented product name data can be distributed in two physical lookup tables called productname_ trans_AtoM and productname_trans_NtoZ. ■ Different levels of translation tables are available. For example, translations are available in both an Essbase data source and a relational data source. It is preferable to use the same source as the base query. Unlike logical lookup tables, which you designate by selecting an option in the Logical Table dialog, you configure physical lookup tables by constructing lookup functions in the logical table source mapping. For example, suppose that you have the following physical tables: ■ A base table called Categories, with columns such as categoryid and categoryname. ■ A translation table called Categories_Trans, with columns such as categoryid, language_key, and categoryname. The translated value of categoryname is determined through a combination of the categoryid and language_key columns. Suppose that you have a logical table called Categories. In that table, you add a new logical column called categoryname_p, which is a translation column that depends on Note: You cannot use a derived logical column that is the result of a LOOKUP function as part of a primary logical level key. This limitation exists because the LOOKUP operation is applied after aggregates are computed, but level key columns must be available before the aggregates are computed because they define the granularity at which the aggregates are calculated. You can use a derived logical column that is the result of a LOOKUP function as a secondary logical level key. Table 15–3 Mapping Table for Non-ISO Language Codes WEBLANGUAGE LANGUAGE LAN_INT en ENG cn CHI 1 fr FRA 1