Removing secondary languages from the database

If you have secondary languages installed on your database that you no longer need, you can remove them. Removing secondary languages frees memory and might improve the performance of the database.

Procedure

  1. Optional: Run the following SQL statement to get a list of all languages installed on the database including the base language: select languagename, maxlangcode from language where enabled = 1;
  2. Optional: If you do not know the base language, run the following SQL statement: select varvalue from maxvars where varname = 'BASELANGUAGE'; When the base language is identified, you can identify secondary languages.
  3. To disable a language, run the following SQL statement on the database, replacing language_code with the language code of the secondary language that you want to remove: update language set enabled = 0 where maxlangcode = 'language_code'; This command does not remove the translation of the secondary language. Ensure that you do not disable the base language.
  4. To remove the translation of the secondary language, run the following SQL statement against your database, where language_code, is the language code of the language to remove:
    Database SQL Statement
    Oracle or IBM® DB2® select 'delete from ' || langtablename || ' where langcode = ''language_code'';' from maxtable where langtablename is not null;
    Microsoft SQL Server select 'delete from ' + lower(langtablename) + ' where langcode = ''language_code'';' from maxtable where langtablename is not null;
    The output from this statement is approximately 32 lines of code.
  5. Copy and paste all the delete statements from the output and run the output against your database.
  6. To remove the language from the table that is used to track versions, run the following SQL statement against your database:
    delete from tdtversion where language = 'language_code';

What to do next

You must restart the application server after you remove a language for the change to take effect.


Feedback