# Return Translation Manager Languages in Perspective

**URL:** <https://forum.inductiveautomation.com/t/return-translation-manager-languages-in-perspective/107695>\
**Category:** Ignition\
**Tags:** edge, ignition81, perspective\
**Created:** [June 23, 2025, 9:26pm UTC](https://forum.inductiveautomation.com/t/return-translation-manager-languages-in-perspective/107695 "2025-06-23T21:26:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RD17](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@RD17](https://forum.inductiveautomation.com/u/RD17)\
**Post date:** [June 23, 2025, 9:26pm UTC](https://forum.inductiveautomation.com/t/return-translation-manager-languages-in-perspective/107695/1 "2025-06-23T21:26:01Z")

</div>

I’m working on an Ignition Edge Perspective project and want to create a dropdown component that lists available translation languages based on what languages are in the Translation Manager.

Ideally, I want this dropdown to be reusable across different Edge projects, each having a different set of languages.

This is the script the Perspective User Management Resource uses:

```python
def transform(self, value, quality, timestamp):
	from java.util import Locale
	import operator

	# Gets list of available locales from the Gateway and creates a dictionary of locales.
	list = []
	for locale in Locale.getAvailableLocales():
		# If the locale has a country associated with the local, append the country name.
		if "-" in locale.toLanguageTag():
			dict = { "value": locale.toLanguageTag().replace("-", "_"), "label": locale.displayLanguage + " (" + locale.displayCountry + ")" }
	 	else:
			dict = { "value": locale.toLanguageTag().replace("-", "_"), "label": locale.displayLanguage }
	 	list.append(dict)
	list = sorted(list)
	return list[1:]

```

Is there a way to filter by languages in the Translation Manager?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 23, 2025, 9:52pm UTC](https://forum.inductiveautomation.com/t/return-translation-manager-languages-in-perspective/107695/2 "2025-06-23T21:52:42Z")

</div>

Preliminary disclaimer: This is subject to change in 8.3, and once you're importing internal Java classes you're on your own if an update ends up breaking functionality, but as a starting point:

1. You need to obtain a [`TranslationPackage`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.48/com/inductiveautomation/ignition/common/i18n/translation/TranslationPackage.html) - this has a defined list of locales associated with it (and a bunch of other introspective methods you may find useful).
2. To get a TranslationPackage, you need to ask the gateway, which requires you to obtain a `GatewayContext` instance. Search the forum for how to do so; it's your entrypoint to unsupported behavior so I required folks to do a bare minimum of due diligence before I tell them how to do it now 😄
3. From the gateway context you'll call the undocumented `getLocalizationManager` method to get a `LocalizationManagerImpl`.
4. That `LocalizationManagerImpl` has a no-argument `loadFullPackage()` method that returns your base `TranslationPackage`.

As an aside, shadowing names like `dict` and `list` in your own Python code is a bad idea - can make it hard to read down the line for someone else, and runs the risk of 'leaking' outside a context you expect.

---

<div class="post-metadata">

**Author:** ![RD17](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@RD17](https://forum.inductiveautomation.com/u/RD17)\
**Post date:** [June 23, 2025, 10:10pm UTC](https://forum.inductiveautomation.com/t/return-translation-manager-languages-in-perspective/107695/3 "2025-06-23T22:10:06Z")

</div>

Thank you, I will look into this. I also appreciate the shadowing names advice.
