notify.moe icon indicating copy to clipboard operation
notify.moe copied to clipboard

Translations: Data type

Open akyoto opened this issue 7 years ago • 0 comments

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.

akyoto avatar Nov 15 '18 19:11 akyoto