Closed tulir closed 7 years ago
Note to self: We can probably easily implement internationalization of field labels by simply using the full path to the fields as the I18n key. That way it requires no schema changes and we can use the current labels as fallback if necessary.
Internationalization is now implemented for most fields, but we need to add at least an English localization.
There's a continuation of this branch in the next pull request, so don't rebase this to avoid having to manually fix things.
@brylie I replaced all the form references with interpolations
In general, we can merge this as-is.
However, I am wondering if we can reduce the verbosity in our i18n keys:
overrideI18nPath
overrideI18nKeys
i18nKey
A couple of minor improvements, to improve consistency, would be:
override
from the keys. E.g.
i18nKey
i18nKeys
i18nPath
i18n
I moved all the generic I18n fields* into the i18n
object and renamed the i18n
function to localize
. However, there are still a few problems with unlocalized fields that I need to check out.
* i18nKey
is not a generic field, it only applies for Optionfield
choices, so I left it as-is.
Now everything should work, testing in progress...
Ah, I merged, since the PR was still marked as ready for review.
Fixes #99
This pull request adds internationalization (I18n) support to everything using aurelia-i18n (I18next). This also adds some of the Finnish translations.
Demo available at https://dev.openapi.design/feature/i18n/