--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-dev.
For more options, visit https://groups.google.com/d/optout.
Hi Jono, hi Loz,
Well, using i18n (and zauberfisch’s betterI18N task for automatic yml generation, see https://github.com/Zauberfisch/silverstripe-better-i18n) clears up your code a lot. No need to define all the field lables in your DataObject class, no need to create extra _t() statementes for them, that’s a very nice way to get your form scaffolded and the field labels translated.
The static field lables cannot be translated, so you need to define a fieldLabels() method in your class. Unfortunaltely static $fieldLabels also overrules I18N’s db_Foo, which is in return a major pain when I try to make good modules I18N ready…
By default the name of the db field is used as field label, e.g. “FirstName” will become “First Name”, you can of course overwrite it in your lang/en.yml
This of course requires some “international” thinking I do every day, cause 95% of my projects are multi language projects (and on some days I really think you guys US, NZ or UK building English only sites must be really lucky!)
Cheers, Werner (wmk)
Best
wishes,
Marijn
Kampf
Exadium - Online Marketing & Web Development
mar...@exadium.com / www.exadium.com
uk mobile: 07 525 49 9234 / uk landline: 01446
620 436 / nl telefoon: 0357 110 379
international mobile: 0044 7525 49 9234 / phone uk:
0044 1446 620 436 / phone nl: 0031 35 71 10 379
Marijn
Kampf
Exadium - Online Marketing & Web Development
mar...@exadium.com / www.exadium.com
uk mobile: 07 525 49 9234 / uk landline: 01446
620 436 / nl telefoon: 0357 110 379
international mobile: 0044 7525 49 9234 / phone uk:
0044 1446 620 436 / phone nl: 0031 35 71 10 379
Member:
lang:
singular_name: 'Member'
plural_name: 'Members'
cms_fields:
LockedOutUntil:
label: 'Locked out until'
PasswordExpiry:
label: 'Password Expiry Date'
description: 'The last day this password can be used'