Ticket #1744 (closed enhancement: invalid)
lang-inheritance in templates
| Reported by: | ischommer | Owned by: | bfojcapell |
|---|---|---|---|
| Priority: | medium | Milestone: | |
| Component: | i18n | Version: | |
| Severity: | medium effort / impact | Keywords: | |
| Cc: | Hours: |
Description
i18n.php->include_by_class() looks for definitions only for the specific template. as most of the templates have an "implied inheritance" through the controller they're attached to, we could try to find the definitions in the inheritance chain as well. this relies on some naming conventions, but as the inheritance is optional its not a big problem.
example: i tried to use _t('ADDLISTING') in the translation-module. i18nAdmin_left.ss -> i18nAdmin.php (extends GenericDataAdmin?) now if either the /lang-folder in the translation-module is not present, or the specific key $lang['en_US']['i18nAdmin_left.ss']['ADDLISTING'] is not present, it should fall back to $lang['en_US']['GenericDataAdmin_left.ss']['ADDLISTING'].
possible rules:
- templatename without ".ss" as controllername
- templatename before first "_" as controllername
