Languages and alternative language support ⇒ i18n - l10n (languages) ⇒ Replacement of localisation variables in templates ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Indexi18n - l10n (languages)

Replacement of localisation variables in templates Reply to topic


Hello,

just a quick thought:
If a localisation variable is not defined for the current language we see ugly _VARIBALE_NAME on the rendered page.
What if the core tries to resolve the var in english first and in case no match is found takes the variable name, lowercases it and replaces "_" by " ".
The page would be nicer would'nt it ?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0


I think you are on to something worthwhile ... What if the English version used was double-underlined so that an Admin could see the error?

At least with the English version a confused user can look it up in Google Translate or similar. The variable name likely means nothing to anybody without reference to the code.

Would be good if it added it as a Warning to the debug tables in a new DF section like SQL and PHP already does. And the current template(s) used as a Notice(s) to assist same.

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


hmm, why would you not simply fix the real problem instead of working around it?

Many of the defines are abbreviated anyway so it makes no sense to me.

In any event, you should be submitting it through Projects.

DonationsPro for DragonflyCMS & SMF

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Can only be achived using arrays instead on defines, if it tries to load a second language you'll get dozens of already defined constants warnings.

As phoenix say, language file needs to he updated.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS

All times are UTC


Jump to: