I've recently been in US and I've noticed one (among many) interesting solution: write manual ahead, so people don't need to think too much to make incorrect assumptions.
For example, related to phrases, we have lot of very useful fields in almost every form (database table) in In-Portal, but no one, except developers knows what most of them do.
Then maybe we need to implement site-wide inline help system. We already have ability to add descriptive hint about field/configuration variable usage, but we rarely actually use that ability.
Since any translatable text on a website is a phrase, then adding a lot of helping text will double (in worst case) language pack size.
To solve that problem before we get to it I'm proposing to add HintTranslation column into Phrase table, right after Translation column that we have already. This way every phrase we created can have hint translation stored under the same name as phrase is stored currently.
To determine what translation (regular or hint) should be used I'm proposing to add "hint:" in front of phrase name to get it's hint translation instead of actual translation. For example:
- <inp2:m_Phrase name="la_fld_Name"/> - returns just la_fld_Name phrase translation;
- <inp2:m_Phrase name="hint:la_fld_Name"/> - returns a hint translation, associated with la_fld_Name phrase.
In case, when la_fld_Name phrase's translation should have different hints on different forms, then we'll use same old approach, when phrase la_hint_AnotherHintForName is created and specified directly to inp_edit_box block via hint_label parameter in template. When not specified, then we'll assume, that hint phrase is "hint:" + phrase for field name (e.g. la_fld_Name in this case).
Another thing, that could be automated this way is actual "la_fld_Name" phrase. In 99% cases, when field name is Name, then corresponding phrase to show is "la_fld_Name". This way regular form field code in template would became <inp2:m_RenderElement name="inp_edit_box" field="Name"/> instead of <inp2:m_RenderElement name="inp_edit_box" field="Name" title="la_fld_Name" hint_label="la_hint_Name"/>.
Of course if we need to do a manual override, then ability to specify "title" parameter will stay.
Same way we can get rid of specifying "la_col_Name" in every grid column definition, however in 99% cases it matches "la_col_" + FieldName formula.
Some programming is needed to figure a way how to load both translation and hint translation phrases at once.
--
Best Regards,
http://www.in-portal.comhttp://www.alex-time.com