larsiusprime / polymod

Atomic modding framework for Haxe
MIT License
161 stars 62 forks source link

Enhancement: Localization Support #81

Closed EliteMasterEric closed 2 years ago

EliteMasterEric commented 2 years ago

This is one of the higher issues on my priority list, and seeks to resolve larsiusprime/firetongue#41.

My current plan is to add the ability to pass a Firetongue instance to Polymod, which will allow it to check the current language and therefore provide the appropriate asset when queried.

Similarly to how modded assets take precedence over unmodded assets, localized assets take precedence over unlocalized ones. Implementing the system in this manner would allow Polymod to provide localization as a useful utility, both for mod creators looking to port content (even to languages that the base application does not support) and even to unmodded applications (providing a system for asset replacement based on locale).

larsiusprime commented 2 years ago

If you need to make any changes to Firetongue, I can make you a collaborator there too

EliteMasterEric commented 2 years ago

If you need to make any changes to Firetongue, I can make you a collaborator there too

Thanks, but my current plan is not to make any changes to Firetongue. As mentioned, it would be redundant for Firetongue to include its own asset handling system when Polymod already provides this feature.

My current plan is to simply add the option to provide Polymod with a Firetongue instance, from which it can call tongue.locale to get the current locale. I can then change the asset retrieval system to utilize that value if it is available.

EliteMasterEric commented 2 years ago

This feature was successfully implemented in 1.4.0.