private void setLanguage(LanguageTranslator translator, TaskMonitor monitor) {
		//setEventsEnabled(false);
		try {

			language = translator.getNewLanguage();
			languageID = language.getLanguageID();
			languageVersion = language.getVersion();

			// AddressFactory need not change since we are using the instance from the
			// Program which would have already been subject to an upgrade
			addressMap.setLanguage(language, addressFactory, translator);

			clearCache(true);

			DBRecord record = SCHEMA.createRecord(new StringField(LANGUAGE_ID));
			record.setString(VALUE_COL, languageID.getIdAsString());
			table.putRecord(record);

			record = SCHEMA.createRecord(new StringField(LANGUAGE_VERSION));
			record.setString(VALUE_COL, Integer.toString(languageVersion));
			table.putRecord(record);

			setChanged(true);
			clearCache(true);

			//invalidate();

		}
		catch (Throwable t) {
			throw new IllegalStateException(
				"Set language aborted - program user data is now in an unusable state!", t);
		}
//			finally {
//				setEventsEnabled(true);
//			}
	}
Translate language
@param translator language translator, if null only re-disassembly will occur.
@param monitor task monitor
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/ProgramUserDataDB.java