lcollong
FabriKant d'applications web
Hi,
If creating list tables from already existing MySQL tables (workbench), the element are created and a label is computed from the column name. In the Fabrik's params we have several choice to transform a column name into a proper label "automagically". That's nice.
But, if you want to build a multilingual site, you'll use language override to translate the labels constant to the the right localized text.
When the labels are created by Fabrik, underscores are replaced by white spaces. So user_Name could become "user Name", "User Name", "user name" or "USER NAME" but none of them could be used "as is" by language override feature which doesn't like white space.
So the first solution would be to add an option in the parameters (see snapshots) to leave the labels as the column name are. So "user_Name" would stay "user_Name" as a label. Thus you can add a constant to override the language the would say : USER_NAME="Nom de l'utilisateur" in french for example.
It would be better that this new option says "leave colum name as the are but all capitalized and replace any white space (?!?) by an underscore". A column "user_Name" would become a label "USER_NAME" as Joomla override mechanism is expecting capitalize letters in the constant (also it works with lower case).
Ideally we should be able to prepend all the labels with a fix constant in order to differenciate the constants of our own Fabrik's app from these coming from Joomla or others components (USER_NAME is probably used by the Joomla users management parts).
So we'd have a field to enter a fix constant : "MY_STUFF" and the labels would be created as :
MY_STUFF_USER_NAME
making this constant unique and easily manageable in the languages override files.
Could it have some hidden side effects ? At least the first solution should relatively easy to implement ?
Thanks for feedback.
If creating list tables from already existing MySQL tables (workbench), the element are created and a label is computed from the column name. In the Fabrik's params we have several choice to transform a column name into a proper label "automagically". That's nice.
But, if you want to build a multilingual site, you'll use language override to translate the labels constant to the the right localized text.
When the labels are created by Fabrik, underscores are replaced by white spaces. So user_Name could become "user Name", "User Name", "user name" or "USER NAME" but none of them could be used "as is" by language override feature which doesn't like white space.
So the first solution would be to add an option in the parameters (see snapshots) to leave the labels as the column name are. So "user_Name" would stay "user_Name" as a label. Thus you can add a constant to override the language the would say : USER_NAME="Nom de l'utilisateur" in french for example.
It would be better that this new option says "leave colum name as the are but all capitalized and replace any white space (?!?) by an underscore". A column "user_Name" would become a label "USER_NAME" as Joomla override mechanism is expecting capitalize letters in the constant (also it works with lower case).
Ideally we should be able to prepend all the labels with a fix constant in order to differenciate the constants of our own Fabrik's app from these coming from Joomla or others components (USER_NAME is probably used by the Joomla users management parts).
So we'd have a field to enter a fix constant : "MY_STUFF" and the labels would be created as :
MY_STUFF_USER_NAME
making this constant unique and easily manageable in the languages override files.
Could it have some hidden side effects ? At least the first solution should relatively easy to implement ?
Thanks for feedback.