Add Ignore Capitalization setting to translation keys

This might be a shot in the dark but I'm looking for way to add Ignore Capitalization to my keys through scripting. Im able to add keys using the following, but I could not find anything in the Javadocs for adding Ignore Capitalization, is this possible?

from com.inductiveautomation.ignition.gateway import IgnitionGateway
from com.inductiveautomation.ignition.common.i18n.translation import TranslationPackageDiff
def add_key(key):
	"""
	DESCRIPTION: This function creates a translation package diff that includes the addition of
	the specified translation key. The change is then applied to the Localization Manager.
	
	PARAMETERS: key (str): The translation key to be added.
	"""
	#set translationdiff package
	modifications = TranslationPackageDiff()

	#remove key
	modifications.addTerm(key)

	#Apply change
	IgnitionGateway.get().getLocalizationManager().applyDiff(modifications)

Trying to add this setting:
image

Looks like something involving KeyHashRule and a BasicTranslationPackage. You'll have to poke around unless someone in the know chimes in.

1 Like