By default, Aptify presents system information in English. However, this may not be the primary language for many of an organization's users. Organizations in non-English speaking countries or organizations that have a presence in multiple countries or regions may wish to present Aptify field names and captions in other languages specific to each particular user.
Therefore, Aptify provides a localization solution that manages multiple cultures and displays culture-specific text on a per-user basis. For example, when an English-speaking user opens a form, a Name field has a Name caption, but when a Spanish-speaking user opens the same form, the Name field has a Nombre caption.
The Localization Administration application contains several services that defines the supported cultures and the text strings that can appear in multiple languages. Also, this functionality is not limited only to language but extends to alternate spellings and region-specific dialects as well. For example, the Americans, British, and Australians all use the English language, but each culture varies in its specific implementation. With Aptify, an organization can define different culture strings that map to various spellings in the same language (such as "color" in US English and "colour" in UK English).
This topic contains the following sub-topics:
- How to Localize the Aptify Interface
- Defining Cultures
- Working with Culture Strings
- Linking Fields to Culture Strings
- Localizing Standard and Data Combo Value Lists
- Programmatically Retrieving Culture String Data
- Creating Culture Strings Automatically For Code Development
- Linking Users to Cultures
- Managing International Addresses
How to Localize the Aptify Interface
The following is an overview of how an organization localizes the Aptify interface to support multiple cultures:
- An organization identifies the supported cultures and creates a Cultures record for each, as necessary. See Defining Cultures for details.
- An organization identifies the text strings that require localization and defines the applicable local string for existing Culture Strings already in the system. If a particular string is not already present, the organization creates a new Culture Strings record as needed. Each Culture Strings record contains a sub-type record that identifies the string's appearance for a particular culture. See Working with Culture Strings for details.
- The Culture Strings service includes a set of records to localize all areas of the Aptify system that are accessible by the typical end user. An organization only needs to add the applicable Local Strings for the organization's supported cultures to these Culture Strings. Aptify's delivered culture strings covers both metadata records (such as Entity Name culture strings) and culture strings that are embedded in code (such as display names in code-based wizards).
- The Localization Administration application includes a Localization Grid dashboard that can be utilized to simplify the data entry process for translating various culture strings into a localized language. Culture String/Language relationships can easily be modified by directly editing the string within the grid without having to open any Culture Strings records. Note that this is a global dashboard that does not appear by default. See Defining Local Strings with the Localization Dashboard for details.
- An organization links new system metadata to Culture Strings as needed (since all of the Aptify-delivered culture strings are already linked to the appropriate locations). See Linking Fields to Culture Strings for details.
- As applicable when creating configurations that need to support localization, a developer leverages a set of Aptify-supplied functions that can return the applicable local string for the currently logged-in user. See Programmatically Retrieving Culture String Data.
- An organization links each user to a culture. See Linking Users to Cultures for details.
- When a user logs into Aptify, the system displays text and captions in that user's specified culture for all data that is linked to a Culture Strings record.
If a particular culture string exceeds the size of a field's label, Aptify automatically truncates the caption and adds an ellipsis (...) to indicate that the field name is too long for the label. An administrator can use the Visual Designer to increase the Label Width on a form to accommodate longer captions, as needed. See Modifying Field Layout with the Visual Designer for information on the Visual Designer.
Note that localization not only applies to the user interface but also to address management to display addresses and phone numbers in the format familiar to the user and to prepare address mailing labels in the format suitable for the destination. See Managing International Addresses for details.
By default, Aptify includes a localization bypass for users linked to Culture ID 1 (English). With the bypass in place, Aptify uses the Culture String data's Base String only and does not load Local String information. An administrator can change the Bypass Culture, if necessary, by adding the BuiltInCultureID configuration attribute to Aptify Shell.exe.config. See About the User Login Configuration Attributes for more information on setting this attribute.
Defining Cultures
When configuring the localization options in Aptify, the first step is to identify the cultures and languages that your organization needs to support. You should also categorize these cultures into base cultures and sub-cultures. For example, the English language is a base culture and English - US, English - UK, and English - Australia are all sub-cultures of the English base.
Once these cultures have been identified, you can create a Cultures record for each, following the steps below. Note that the standard Aptify installation provides a set of default Cultures records, including the base English culture, the English - US sub-culture, the English - UK sub-culture, and the Spanish base culture. You can use these existing records as a reference when creating new records.
- Add the Localization Administration application to your profile, if necessary.
- Expand the Localization Administration heading and open a new record for the Cultures service.
- Enter the culture's Name and a Description in the fields provided.
- Enter a Code for the culture.
- Aptify recommends that you use the language identifier standard defined in RFC-3066. This standard uses the 2-digit ISO 639-1 language code (lower case) followed by a dash and the 2-digit or 3-digit ISO 3166-1 country code (upper case).
- For example, the RFC 3066 code for US English is en-US.
- See http://www.ietf.org/rfc/rfc3066.txt for RFC 3066.
- See http://www.loc.gov/standards/iso639-2/annexa.html for information on the ISO 639 standard. Also, the following site contains the list of 2-digit language codes: https://www.loc.gov/standards/iso639-2/php/code_list.php
- See the International Organization for Standardization (ISO) website for the list of ISO 3166 country codes: http://www.iso.org/iso/country_codes.htm.
- Aptify recommends that you use the language identifier standard defined in RFC-3066. This standard uses the 2-digit ISO 639-1 language code (lower case) followed by a dash and the 2-digit or 3-digit ISO 3166-1 country code (upper case).
- If you are creating a sub-culture (such as a sub-set for a major language, like French Canadian), enter the parent culture in the Base Culture field. If you are creating a base culture, leave this field blank.
- Specify the Address Form Template for this culture in the field provided.
- A developer can use Aptify's Visual Designer tool to create a new Form Templates record that displays addresses in a culture-specific layout. Users can then see all addresses in the system in the format most familiar to them. See Managing International Addresses for information on how an organization can use different Address Form Templates and see Administering Form Templates for information on how to create new templates.
- When Aptify loads a form that includes the Addresses control, it loads the address into the Form Template specified in this field.
- This is a required field. Aptify includes several standard Addresses form templates, such as USA Address (ID 6935), UK Address (ID 10047), Canada Address (ID 10072), and Australia Address (ID 10073). You can use one of the standard address templates or create your own.
- Specify the Phone Form Template for this culture in the field provided.
- A developer can use Aptify's Visual Designer tool to create a new Form Templates record that displays phone numbers in a culture-specific layout. Users can then see all phone numbers in the system in the format most familiar to them. See Managing International Addresses for information on how an organization can use different Phone Form Templates and see Administering Form Templates for information on how to create new templates.
- When Aptify loads a form that includes the Phones control, it loads the phone number into the Form Template specified in this field.
- This is a required field. Aptify includes several standard Phone Number form templates, such as USA Phone Number (ID 3729), and UK Phone Number (ID 10071). You can use one of the standard address templates or create your own.
- Save and close the record.
- Add additional Cultures records as necessary.
Working with Culture Strings
After creating the necessary Cultures record, a translator needs to define the applicable Local String for each Culture String that the organization wants to localize. In addition, an administrator may need to create new Culture Strings records that correspond to new functionality that the organization has added to Aptify.
This topic contains the following sub-topics:
- About the Aptify Delivered Culture Strings
- Defining Local Strings with the Localization Dashboard
- Creating New Culture Strings
- Creating Culture String Categories
About the Aptify Delivered Culture Strings
The Culture Strings service includes a set of records to localize all areas of the Aptify system that are accessible by the typical end user. An organization only needs to add the applicable Local Strings for the organization's supported cultures to these Culture Strings. Aptify includes over 15,000 delivered culture strings organized into over 150 categories. These records cover both system metadata (such as Entity Name culture strings) and culture strings that are embedded in code (such as display names in code-based wizards).
This includes the following areas:
System Metadata Culture Strings
The following metadata records include one or more links to the Culture Strings service to localize particular content in Aptify:
- Application Ribbon Buttons: To localize the display name and tool tip of a ribbon button.
- Application Ribbon Groups: To localize the display name of a ribbon group.
- Applications: To localize the name of an application in Aptify.
- Attendee Status: To localize the name and description of meeting attendee status options.
- Base Fields: To localize the display name and help text for Base Fields.
- Commands: To localize the display name and tool tip of a menu item or button in the Aptify user interface.
- Dashboard Buttons: To localize the name and description of a dashboard button.
- Dashboards: To localize the name of a dashboard. A corresponding Culture String field also appears in the Dashboard Options configuration dialog.
- Dashboard Parts: To localize the name of a dashboard part. A corresponding Culture String field also appears in the Dashboard Parts configuration dialog.
- Entities: To localize the name of a service (for top-level entities) or the caption for a sub-type tab on generated forms (for sub-type entities).
- Entity Actions: To localize the name of code-based wizards as they appear in a tool tip when a user hovers over the wizard's icon in the view toolbar.
- Entity Fields: To localize a field's caption on generated forms and the help text.
- Entity Reports: To localize the name and description of reports that appear in the Report wizard.
- Field Value Lists: To localize options in a standard or data combo value list. By default, the Preferred Addresses drop-down lists on the Persons form are localized using this method.
- Localizing Standard and Data Combo Value Lists: See Localizing Standard and Data Combo Value Lists for more details.
- Form Template Parts: To localize text that appears in a form template (that cannot be localized at the Entities or Entity Fields level). This option lets you specify culture strings for tab names that are outside the scope of an entity (such as the Attachments tab or Topic Codes tab found on many forms).
- Member Types: To localize the name and description of Member Type options on the Persons and Companies forms.
- Order Sources: To localize the name and description of Order Sources options on the Orders form.
- Order Status Types: To localize the name and description of the Order Status options on the Orders form.
- Report Categories: To localize the name of report categories that appear in the Report wizard.
- View Types: To localize the display name of a view type.
- Wizards: To localize the name, description, and step names of metadata wizards.
Code-based Culture Strings
Aptify provides a set of Culture Strings record that localize aspects of the user interface that are not configurable through metadata, such as the items described below. In this case, an organization only needs to define the applicable Local Strings for the existing Culture Strings records to localize these areas of the system:
- Aptify Shell options (context menus, status messages, system tooltips, etc.)
- Aptify configuration dialogs (such as the View Properties dialog)
- Code-based wizards
- Aptify Generic Entity Validation Messages
- Messages triggered by Entity Field Validation Scripts
- Messages triggered by Process Flow Scripts
- Extension Objects
Aptify uses the Culture String's Name field and the Culture String Category to identify the applicable location where the Culture String is used. The Culture String's Base String field identifies the default value for the string. For example, the Culture String with a name like AptifyLockBoxWizard.LockBoxWizard.DoLocalization.WelcomeText identifies the record that can localize the Lock Box Import Wizard's Welcome message.
Defining Local Strings with the Localization Dashboard
Since Aptify includes many delivered Culture Strings, the major task for a translator is to provide local translations for those strings. Aptify provides the Aptify Localization Grid dashboard to simplify this process. The dashboard utilizes the multi entity grid control functionality to simplify the data entry process for translating various culture strings into a localized language.
This dashboard is not the default for the Localization application. Aptify also includes another dashboard that displays list views of the Cultures and Culture Strings services as the default. The multi entity grid dashboard described in this section is accessible using the Switch Dashboard option.
In the sample shown below, the multi entity grid displays the Culture Strings (using the Base Strings) as rows and Cultures as columns. The individual cells identify the translation of the default string to a particular language. These Culture String/Language relationships (which correspond to CultureStringLocals sub-type records) can easily be created, modified or deleted by directly editing the string within the grid without having to open any Culture Strings records. Note that an administrator can create a copy of the dashboard and modify the part's source SQL to display only a specific set of cultures as columns (rather than the cultures that Aptify displays by default).
Creating New Culture Strings
As needed, follow these steps to create a Culture Strings record that will display localized content for each culture:
You do not need to create Culture Strings records for number, currency, date, and time fields. The format of these fields flows down from the computer's Regional Settings and from the SQL server regional settings.
- Add the Localization Administration application to your profile, if necessary.
- Expand the Localization Administration heading and open a new record for the Culture Strings service.
- Enter a Name for the culture string.
- Culture String Names must be unique. This prevents object methods that are associated with multiple Culture Strings records to retrieve the incorrect culture string.
- Aptify uses the name to identify the type of culture string and the location to which it applies (such as Entities.DisplayName.SalesTargets to identify the culture string that applies to the Sales Targets entity's display name).
- Enter the default text for this string in the Base String field.
- This is the record's name field; it is the string's representation in the neutral/base culture.
- This is the string that appears for users are either not assigned a culture or whose culture (or base culture) does not have a Local Strings sub-type record.
- Enter a Description of the string in the field provided.
- Enter a Category for this string. This field links to the Culture String Categories service.
- See Creating Culture String Categories for Information on Culture String Categories.
- See Creating Culture String Categories for Information on Culture String Categories.
- Save the record.
- Click the Local Strings tab.
- The Local Strings tab displays a grid of available cultures for which you can specify a location translation of the Base String.
- The available cultures are defined in the Cultures service. See Defining Cultures for details.
- Enter the text that corresponds to the specified culture directly within the grid.
- This is the text that will appear in Aptify for users who are associated with the culture you entered in the Culture field.
- For example, if you are localizing the term Attachments for Spanish users, you would enter Adjuntos in the Local String field, as shown below.
- If you are localizing a menu option that supports a shortcut key combination (for example, an underline appears under one letter of the word and pressing the Alt key plus that letter executes that particular function), you can define which letter in the localized string to use as the shortcut key by placing an ampersand (&) before the desired letter in the Local String definition. See the Culture Strings record for "OK" (ID 470) for an example.
- If you want to record additional comments about a particular local string, double-click within its row or click the Open button in the toolbar to open the corresponding Local Strings record shown below). Click OK to save and close this record if you make any changes.
-
Enter local strings for additional cultures as necessary.
If you have not specified a Local String for a particular sub-culture, users of that sub-culture will use the Local String for their culture's Base Culture. For example, if you created an Attachments local string for the English base culture but not for the United States and United Kingdom sub-cultures, then this string applies to users associated with the en, en-US, and en-GB cultures.
- Save and close the Culture Strings record.
- Add additional Culture Strings records as necessary.
- Review the set of existing Culture Strings records and add Local Strings for your organization's supported cultures as necessary.
- The Culture Strings service includes a set of records to localize the standard commands in the user interface (such as the menus and the button bar on each form). An organization only needs to add the applicable Local Strings for the organization's supported cultures to these Culture Strings. See About the Commands Form for more information on the standard commands in Aptify.
Creating Culture String Categories
Each Culture Strings record is linked to a Culture String Categories record for categorization purposes. Aptify includes over 150 categories by default.
Follow these steps to create a new Culture String Categories record:
- Add the Localization Administration application to your profile, if necessary.
- Expand the Localization Administration heading and open a new record for the Culture String Categories service.
- Enter a category name in the Name field.
- If this is a sub-category of an existing category, enter the parent category in the Parent field.
- Enter a Description for the category.
- Save and close the record.
Linking Fields to Culture Strings
To localize content based on culture, you need to associate system data with the Culture Strings records you created. In Aptify, you can configure the system to use a localized culture string in several locations within metadata:
- Application Ribbon Buttons: To localize the display name and tool tip of a ribbon button.
- Application Ribbon Groups: To localize the display name of a ribbon group.
- Applications: To localize the name of an application in Aptify.
- Attendee Status: To localize the name and description of meeting attendee status options.
- Base Fields: To localize the display name and help text for Base Fields.
- Commands: To localize the display name and tool tip of a menu item or button in the Aptify user interface.
- Dashboard Buttons: To localize the name and description of a dashboard button.
- Dashboards: To localize the name of a dashboard. A corresponding Culture String field also appears in the Dashboard Options configuration dialog.
- Dashboard Parts: To localize the name of a dashboard part. A corresponding Culture String field also appears in the Dashboard Parts configuration dialog.
- Entities: To localize the name of a service (for top-level entities) or the caption for a sub-type tab on generated forms (for sub-type entities).
- Entity Actions: To localize the name of code-based wizards as they appear in a tool tip when a user hovers over the wizard's icon in the view toolbar.
- Entity Fields: To localize a field's caption on generated forms and the help text.
- Entity Reports: To localize the name and description of reports that appear in the Report wizard.
- Field Value List: To localize the name and description of the value options associated with a field. Note that you can localize the values associated with both standard static list-based combo drop-down lists and SQL-sourced data combo drop-down lists. See Localizing Standard and Data Combo Value Lists for more information.
- Form Template Parts: To localize text that appears in a form template (that cannot be localized at the Entities or Entity Fields level). This option lets you specify culture strings for tab names that are outside the scope of an entity (such as the Attachments tab or Topic Codes tab found on many forms).
- Member Types: To localize the name and description of Member Type options on the Persons and Companies forms.
- Order Sources: To localize the name and description of Order Sources options on the Orders form.
- Order Status Types: To localize the name and description of the Order Status options on the Orders form.
- Report Categories: To localize the name of report categories that appear in the Report wizard.
- View Types: To localize the display name of a view type.
- Wizards: To localize the name, description, and step names of metadata wizards.
One or more Culture String linked fields appear on the form for each of the records listed above (as shown below for the Entity Fields record).
Follow these steps to link system data to culture strings:
These steps are only applicable for new metadata you add to Aptify. Aptify already includes Culture String links for the delivered areas of the system.
- Identify the system data that you want to localize. Typically, this will be new metadata that has been added by your organization since the standard Aptify installation already has the applicable Culture String links in place. Occur on an entity-by-entity basis, depending on what services your users can access.
- When localizing new services, this includes not only a service name and its field captions, but also any tab names that appear on the form, and any Dashboard items that reference this service. The screen shots accompanying these steps illustrate how to localize items associated with a Sample Records entity.
- When localizing new services, this includes not only a service name and its field captions, but also any tab names that appear on the form, and any Dashboard items that reference this service. The screen shots accompanying these steps illustrate how to localize items associated with a Sample Records entity.
- If not reviewed previously, review the existing set of records in the Culture Strings -service to determine if a Culture String already exists for the text you want to localize (you can search based on the Culture Strings. Base String field). Add or edit Local Strings for each Culture Strings record based on your -organization's set of supported cultures.
- Open the record for an Entity you want to localize.
- Enter the culture string to use for the entity's name in the Display Culture String field.
- If you haven't created a culture string for the entity name previously, you can click the blue Display Culture String hyperlink to open a new Culture Strings record.
- If you haven't created a culture string for the entity name previously, you can click the blue Display Culture String hyperlink to open a new Culture Strings record.
- Open a Fields record in the entity and specify the appropriate culture string in the Display Culture Strings field to localize that field's caption on forms.
- Click OK to save and close the Fields record.
- Complete the Display Culture String field for each of the entity's Fields that you want to localize.
- If any of the fields in your entity are derived from a Base Field, specify the Culture String on the Base Fields record rather than at the Entity Field level. This will update all of the fields that are derived from the Base Field.
- If any of the fields in your entity are configured as a Standard Combo Box or a Data Combo Box, you can specify a Culture String for each list value. See Localizing Standard and Data Combo Value Lists for more details.
- In the case of the Sample Records entity, the Name, Date, and Description (found under the Comments tab) fields are all linked to corresponding Culture Strings records.
- Save and close the Entities record.
- Create a view or use the Find Items dialog to locate the Tab Sub-Template Form Templates record for the entity you localized in the previous steps.
- Click the Part List tab to identify all of the Form Template Parts that correspond to tabs on the form.
- This list contains the Form Template Parts that you want to localize.
- In the case of the Sample Records entity, there are three Form Template Parts that correspond to the three tabs that appear on the form: General, Comments, and Attachments.
- Note that you do not need to localize Form Template Parts that correspond to individual fields; these parts inherit the Culture String association from the Fields record.
- Open one of the Form Template Parts records identified in the Part List tab.
- Specify the appropriate culture string to display for the tab in the Display Culture Strings field.
- Save and close the Form Template Parts record.
- Complete the Display Culture String field for each of the appropriate Form Template Parts.
- Close all open records when finished.
- If you want to specify a Culture String for the application under which the service appears, open the appropriate Applications record and specify a culture string in the Display Culture String field.
- If the entity has an associated dashboard, you can specify a Culture String for the dashboard's name either at the Dashboards record, as shown below, or within the Dashboard Options configuration dialog.
- You should specify the Culture String at the Dashboards record for existing Global or Group-level dashboard, which cannot be modified using the Dashboard Options configuration dialog.
- You can specify the Culture String within the Dashboard Options configuration dialog for user-level dashboards or for new dashboards that you plan to reconfigure as either Global or Group-based.
- If the entity has one or more associated dashboard parts, you can specify a Culture String for the dashboard part's name either at the Dashboard Parts record or within the Dashboard Options configuration dialog.
- You should specify the Culture String at the Dashboard Parts record for parts that are associated with an existing Global or Group-level dashboard, which cannot be modified using the Dashboard Options configuration dialog.
- You can specify the Culture String for a dashboard part directly within the Dashboard Options configuration dialog for parts that are associated with a user-level dashboard or for a new dashboard that you plan to reconfigure as either Global or Group-based.
Localizing Standard and Data Combo Value Lists
This topic contains information specific to the localization of both Standard and Data Combo Box value lists:
- Localizing Values Lists for Standard Combo Boxes
- Localizing Static Values Lists for Views
- Localizing Value Lists for Data Combo Boxes
Localizing Values Lists for Standard Combo Boxes
To localize value lists for a standard static-list based combo box, specify a Culture Strings record for the value's name and description as shown below.
Below is an example of a standard static list-based combo box. On the left, the user is tied to the EN culture. On the right, the user is tied to the French culture.
Localizing Static Values Lists for Views
When a field with a static value list is added to a view, the actual value of the field is displayed, not the localized value. To display the localized value in a view, you must create a virtual field on the top-level entity to display localized values in a view. This is done by calculating the value of the virtual field with the SQL function fnGetLocalStringByCultureStringID to extract the culture strings associated with the values of the list.
The steps below provide an overview of how to create a virtual field to display localized values in a view:
- Open a new Fields record in the entity that includes the static combo box that you want to localize.
- Configure the necessary information in the top-area and on the field's General tab.
- Go to the Options tab and make sure the In Table option is cleared.
- The Virtual Field tab is enabled.
- Go to the Virtual Field tab and select Calculated as the Virtual Field Type.
-
Enter the appropriate syntax to display the static list values as localized. Below is an example of the syntax you can use where NameOfComboBoxField is replaced by the name of the field with the static value list and NameOfEntity is replaced by the name of the current entity.
SELECT dbo.fnGetLocalStringByCultureStringID(
(SELECT ISNULL(ValueCultureStringID,-1)
FROM dbo.vwEntityFieldValues ef
INNER JOIN dbo.vwEntities en ON ef.EntityID=en.ID
WHERE ef.Value=NameOfComboBoxField AND en.Name='NameOfEntity'), NameOfComboBoxField)
- Select OK to close the Fields record.
- Save and close the entity.
Below is an example of a view that includes the value of a standard static list-based combo box (the Standard Combo Box field) and a localized virtual field (the Static Value field).
Localizing Value Lists for Data Combo Boxes
A Data Combo Drop-Down field displays a list of records from another table in the database. By specifying a SQL statement, you define the drop-down list's contents from the corresponding table or entity. To localize the list's contents, you utilize the functions fnGetLocalStringByCultureStringID or fnGetLocalStringByCultureStringName to extract cultures for values of a data combo drop-down field.
The steps below provide an overview of how to localize the values in a data combo drop-down field:
- Open the Values record (or create a new one if one does not exist) that is associated with the data combo drop-down field that you want to localize.
- Determine which functions you want to use to extract the localized values from the culture string. The available functions are:
-
fnGetLocalStringByCultureStringID (CultureStringID, BaseString): Use this function to specify the ID of the Culture Strings record. This function will work for values which are static and, regardless of value, return a single local string. This is the recommended approach whenever possible to ensure the correct local string is returned. The parameters that are associated with this function are:
- CultureStringID: The ID of the Culture Strings record.
- BaseString: The name of the base string associated with the Culture Strings record.
-
fnGetLocalStringByCultureStringName (CultureStringName, BaseString): Use this function to specify the Name of the Culture Strings record. This function should be used when you do not know the ID of the Cultures String record and when more than one local string can be returned. The parameters that are associated with this function are:
- CultureStringName: The Name of the Culture Strings record.
- BaseString: The name of the base string associated with the Culture Strings record.
-
fnGetLocalStringByCultureStringID (CultureStringID, BaseString): Use this function to specify the ID of the Culture Strings record. This function will work for values which are static and, regardless of value, return a single local string. This is the recommended approach whenever possible to ensure the correct local string is returned. The parameters that are associated with this function are:
- Specify a SQL statement to define the drop-down list's localized contents.
-
For example, if you want to show a data combo drop-down field that displays the records from the Member Type service as localized values, you could specify the following SQL statement in the Values record's Value field:
SELECT ID, [dbo].fnGetLocalStringByCultureStringName(Name,Name) Value FROM [APTIFY].[dbo].vwMemberTypes
-
In this example, the Member Type.Name field is being passed in for both the CultureStringName and the BaseString. So, this example assumes that the name of the Cultures Strings record and the base string are the same.
Note Concerning Culture String Naming Conventions
When using the SQL function fnGetLocalStringByCultureStringName to localize the value list for a SQL-sourced data combo box, you need to pass in both the Culture String Name and the Base String. For these situations, the simplest approach is to use the same value for the Culture String Name and the Base String for strings that you plan to localize using this function. For example, if you want your data combo drop-down field to display the records from the Member Type service, the Name and the Base String for the Culture Strings record associated with an individual member type could both be Individual Member to simplify the setup of the fnGetLocalStringByCultureStringName, so that you only need to identify and pass in one value to the function.
-
- Select OK to close the Values record.
- Select OK to close the Fields record.
- Save and close the entity.
Below is an example of a SQL-sourced data combo box. On the left, the user is tied to the EN culture. On the right, the user is tied to the French culture.
Programmatically Retrieving Culture String Data
In some cases, a developer may need to load culture string data from the database as part of the implementation of a new configuration. To support these operations, Aptify provides two database functions that can return a local string based on the CultureID of the currently logged in user:
- fnGetLocalStringByCultureStringID: This function accepts two argument (CultureStringID and BaseString) and returns the corresponding local string for the logged in user.
- fnGetLocalStringByCultureStringName: This function accepts two arguments (CultureStringName and BaseString) and returns the corresponding local string for the logged in user.
Note that for both functions if no local string is found, the functions return the base string. See the corresponding Database Objects record in Aptify for more information on these functions.
Creating Culture Strings Automatically For Code Development
When a developer works with code in Aptify, messages displayed to the end user need to be localized. This involves calling the GetCultureLocal method which is used throughout Aptify whenever a localized string is supported. Once the code has been created, a developer must then create the associated Culture Strings record in Aptify. To streamline this process, Aptify provides the following configurable attributes that can be used to automatically create culture strings when the GetCultureLocal method is called:
- CreateMissingCultureStrings: When CreateMissingCultureStrings is set to True, if a culture string is not found for an instance of the GetCultureLocal method is called, a Culture Strings record is created automatically in Aptify using the culture string name and base string specified in the method call. The Category is set based on the value in MissingCultureStringCategoryName (see below). A Local Strings record will also be created for the built-in culture, using the base string for the local string.
- MissingCultureStringCategoryName: A Culture String Categories record is required when saving a new Culture Strings record. Therefore, this attribute determines the name of the Culture Strings Category to be used for the missing culture strings. If a Culture String Category is not found for the name specified, one will be created when the next missing culture string is created.
To use this localization feature in a development environment, a developer must add the following to the Aptify.startup.config file:
<add key="Aptify.Framework.BusinessLogic.CultureUtility.CreateMissingCultureStrings" value="True"/>
<add key="Aptify.Framework.BusinessLogic.CultureUtility.MissingCultureStringCategoryName" value="CategoryName"/>
Linking Users to Cultures
To display localized content to a user, you need to link a user to a culture within the User Administration wizard.
Follow these steps:
- Open a new or existing Users record to launch the User Administration wizard.
-
See Administering User Accounts for information on creating and editing Users records.
The Aptify User Administration wizard is not supported in the Aptify web interface.
-
- Proceed to Step 7 of the User Administration wizard.
- Select the user's culture from the drop-down list.
- Selecting <DEFAULT> links the user to the default culture. An administrator can specify the default culture in the Default Value field for the Users entity's CultureID Fields record. In the standard Aptify installation, the default value for CultureID is 1 (which corresponds to the English Cultures record).
- Not that if you selected <DEFAULT> for a user and then subsequently change the default value for CultureID, the existing user's culture will not update to the new default.
- Complete the User Administration wizard to save the culture assignment.
Once a user has been assigned a culture, the culture strings specific to his or her culture appears the next time that the user logs into Aptify.
For example, a user linked to the Spanish culture sees the Spanish local strings for fields associated with a Culture Strings record. The figure below displays the Sample Records form localized for a Spanish user.
If a particular culture string exceeds the size of a field's label, Aptify automatically truncates the caption and adds an ellipsis (...) to indicate that the field name is too long for the label. An administrator can use the Visual Designer to increase the Label Width on a form to accommodate longer captions, as needed. See Modifying Field Layout with the Visual Designer for information on the Visual Designer
Managing International Addresses
Aptify offers a two-fold approach to address management for organizations with an international presence. First, using Aptify's Localization feature, all addresses in the system are displayed in the format appropriate to the individual user. This streamline address data entry since the fields appear in a format familiar to the end user. See Displaying Addresses in a Format Familiar to Users for details.
Second, when preparing mail for delivery to international locations, each address label needs to be generated in the appropriate format for its destination country. Aptify provides the ability to preview and print labels in the appropriate format based on the postal system specifications for a particular country. See Preparing Mailing Labels in the Appropriate Format for details.
Displaying Addresses in a Format Familiar to Users
In Aptify, an administrator can link each user to a culture. As described in Linking Users to Cultures, this culture assignment determines the captions and labels the user sees while navigating the Aptify Desktop client. It also determines the layout of the address and phone fields that the user sees on forms like Persons and Companies.
Aptify provides a mechanism to localize address and phone formats using Form Template technology, which should streamline data entry since users can enter information in a format to which they are accustomed. Each culture-specific address and phone layout design can have its own form template in Aptify. These form templates are set up so that the particular address fields, such as City, State, and Postal Code, map to the user's expected layout.
For example, a user in France would enter information in a format that is customary to that country (where the Postal Code appears before the City), even when entering addresses in other countries, like the United States and Japan. As shown in the examples below, a French user sees both the address in France (on the left) and the address in the United States (on the right) in the French format.
An administrator defines the appropriate Address Form Template for a particular country in a Cultures record (see Defining Cultures) and links a user to his/her appropriate culture (see Linking Users to Cultures).
Note that Aptify provides address forms for the United States, United Kingdom, Canada, and Australia, and phone number forms for the United States, and United Kingdom. The French layout shown below was specifically designed for this example and is not included with Aptify (but an administrator or developer can easily create one using Aptify's Form Template and Visual Designer technology; see Administering Form Templates for details).
Similarly, users in other countries would see the addresses in their usual and customary layout, thereby making the data entry and review processes intuitive. So, when a user in the United States reviews address information for a company entered by a user in France, the address will appear in the U.S. format for that user. See the figures below for examples of how the same addresses shown in the previous figures appear to a U.S.based user.
Preparing Mailing Labels in the Appropriate Format
The acceptable format for mailing addresses varies from country-to-country. For example, when sending mail to an address in France, the Postal Code should appear before the City (as opposed the U.S. format of City, State ZIP Code).
When preparing mail destined for international locations, Aptify can automatically generate labels in the appropriate format for a particular country, either for a single address or for a set of addresses in a bulk mailing, as described in the following sections:
Preparing a Single Mailing Label from a Form
In Aptify, addresses in a wide range of services, including Companies, Persons, Organizations, and Employees, have a common interface that includes the Address Management Toolbar.
This toolbar contains two buttons that generate a label for the displayed address in the appropriate format for that address's country:
- Copy Address To Clipboard: When a user clicks this button (the first button circled in the figure below), the currently displayed address is copied to the Windows clipboard in the appropriate label format for the address's country. Then, the user can paste the address into another program, such as Microsoft Word.
-
Preview Label: When a user clicks this button, Aptify displays a preview of the current address's label, automatically localized to the appropriate format for that particular country (see the sample label previews below).
See Using the Address Management Toolbar for more information on the Address Management toolbar.
Aptify localizes an address label based on information stored in the Label Lines tab of the country's corresponding Countries record. (The Countries service appears in the Aptify Framework Administration and Localization applications by default. See About the Countries Form for more information on this service.)
The Label Lines tab stores the standard Address copy/preview format for the country. Each sub-type record on this tab corresponds to one line on an address label. Aptify then uses this format to generate mailing label previews or when copying an address to the Windows clipboard for pasting into another program.
The following figure illustrates the label lines format for France.
The Label Lines data is universal to Persons and Companies. If a particular field in the Label Lines definition is not applicable or is blank for a record, then the label does not include that item (and it also does not display blank rows). When previewing a label for a person's record (as shown below), the system ignores the <Name> parameter in the first line since the Persons service, does not have a Name field. Also, the address in the example below has no Line 2, Line 3, or Line 4 so this information is not displayed in the label.
The following figure illustrates a second example (the label lines format for Japan).
When selecting the Preview Label button for a Company, the system displays the Company Name (based on <Name>) but not <First Name>, <Last Name>, and <Company> since these fields are not applicable to the Companies service (as shown below).
Note that not all countries currently have a Label Lines format defined in Aptify. However, an administrator can specify the appropriate format as needed by specifying or modifying Label Lines data in the Countries records.
Printing Bulk Mailing Labels
Aptify include standard reports that generate mailing labels for Persons or Companies. These reports correspond to Avery labels to simplify printing and mailing. (See Using Reporting Tools for information on how to generate reports using the Report wizard.)
In addition, these standard label reports support international address formatting. When a view contains an address outside of the United States, the report localizes the label format based on the address's country so that each address appears in its appropriate mailing format.
For example, in the figure below, a user created an Avery Label 5161 report from a view that contains Persons records in three different countries: the United States, Canada, and Japan. Although all three addresses appear on the same label report, each one uses a different label format, based on the accepted mailing requirements for its country.
Comments
Please sign in to leave a comment.