statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

FR: localizable display for fieldtypes #1831

Open peimn opened 6 years ago

peimn commented 6 years ago

I've got an idea for localization of display of fieldtypes:

call_us:
    type: text
    display: cp.contact_us

The value of display can be sent to translation function. And the result would be:

If key exists: e.g display -> kontaktiere uns If does not: display -> Contact us

peimn commented 6 years ago

Also, this can be extended to other properties like add_row in grid fieldtype or value of option items in select fieldtype.

type: select
display: fieldsets.select_social_profile
options:
  instagram: fieldsets.social_profile_instagram
  facebook: fieldsets.social_profile_facebook
  twitter: fieldsets.social_profile_twitter
  telegram: fieldsets.social_profile_telegram
  linkedin: fieldsets.social_profile_linkedin
  googleplus: fieldsets.social_profile_googleplus
  pinterest: fieldsets.social_profile_pinterest
  dribbble: fieldsets.social_profile_dribbble
jackmcdade commented 6 years ago

Ooh I like this!

On Mar 11, 2018, at 9:28 AM, Peiman Nourani notifications@github.com wrote:

Also, this can be extended to other properties like add_row in grid fieldtype or value of options in select fieldtype.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.