Creating Culture Strings Automatically For Code Development
Note to Developers and Administrators
This topic is intended for developers who are creating code within Aptify. The attributes listed below should only be used in a development environment.
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"/>
Copyright © 2014-2019 Aptify - Confidential and Proprietary