Step 3: Adding a Language Field to the User Table

If you want to specify a default language for individual users, you can add a Language foreign key field to your application's User table. When the user logs in, MM .NET checks if this Language foreign key field exits. If it does, the application's current language is automatically set to the value stored in this field.

The mmUserManager class has a LanguageFKField that specifies the name of the Language foreign key field in the Users table. By default, the name of this field is LanguageFK.

The following steps show how you can create this new field in a SQL Server User's table.

  1. Launch the SQL Server Enterprise Manager

  2. Expand the nodes in the tree and select the Tables node under your database. For example:

  3. In the right pane, right-click the Users table and select Design Table from the shortcut menu.

  4. Move your cursor below the last field in the list and add the following information for the LanguageFK field

  5. It's a good idea to make the Language foreign key field default to the application's "original" language. To do this, go to the bottom of the Table Designer IDE and set the Default Value property to one (1):

  6. Save changes



Note: At run time when a user logs into the application, the current language specified in the LanguageFK field is automatically stored in the mmAppBase.CurrentLanguage property.


Using a Different Name for the Language Foreign Key Field

If you want to use a name other than LanguageFK for the user table's foreign key field, you need to make a subclass of the mmUserManager class and override the value of the LanguageFKField property. This requires two steps:

Create a subclass of the mmUserManager class
Override the CreateUserManager method of your application's Factory class

For details, see the Help topic Security Business Object and read the section "Overriding Security Business Object Data Access Settings".

Displaying the Language-Aware Users Form

If you add a Language foreign key field to the Users table, you should use the language-aware Users Maintenance form, mmUsersFormLang, in your application rather than mmUsersForm. This form has an additional combo box on it that allows you to specify the Language of each user:

See also:
Step 4: Setting Localization Configuration Settings


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 04/26/18
Comment or report problem with topic