notify.moe
notify.moe copied to clipboard
Translations: Data type
Allow translations for any field in any database object.
type Translations:
field ID string (includes ObjectType, ObjectID, ObjectField separated by a colon)
field English string
field Japanese string
field Spanish string
...
For performance reasons, the number of supported languages is fixed and not dynamic (avoid using map lookups).
API examples:
translations, err := arn.GetTranslations("Anime", anime.ID, "Summary")
translations, err := arn.GetTranslations("User", user.ID, "Introduction")
Add new field tag: translatable:"true" so that the automatic edit form can provide a UI for this.