BREAKING - Reworked translation system:
tr()
, tr.setLanguage()
and tr.getLanguage()
tr.addLanguage()
to tr.addTranslations()
%n
-based argument insertion by default (re-enable with tr.addTransform(tr.transforms.percent)
)tr.for()
- translates a key for the specified languagetr.use()
- creates a translation function for the specified language for much easier usagetr.hasKey()
- checks if a key exists in the given languagetr.setFallbackLanguage()
- sets the fallback language used when a key is not found in the given languagetr.getFallbackLanguage()
- returns the fallback languagetr.addTransform()
- adds a transform function to the translation system, allowing for custom argument insertion and much moretr.deleteTransform()
- removes a transform function