[IMPLEMENTED] Templates need language files

More
12 years 2 days ago #25169 by ggppdk
mmm, yes now they are load in frontend items and category views

inside view.html.php

for items:
Code:
// Load Template-Specific language file to override or add new language strings if (FLEXI_FISH || FLEXI_J16GE) FLEXIUtilities::loadTemplateLanguageFile( $params->get('ilayout') );


for category:
Code:
// Load Template-Specific language file to override or add new language strings if (FLEXI_FISH || FLEXI_J16GE) FLEXIUtilities::loadTemplateLanguageFile( $params->get('clayout') );


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 1 day ago #25175 by Rehne

ggppdk wrote: mmm, yes now they are load in frontend items and category views


thanks
it would be great and i think a lot of useful
if it would even are load in backend items, category and typ views

would this be easy to achieve??

i guess also that is really meant by gruz !?

gruz wrote: ... I'd like to copy a template and to add some language strings only for it. The best and the easiest way is to add a language folder in the template and to automatically load files from the folder when editing the template positions or a category or an item type in BE - the places, where the template settings are used. ...


Regards

Please Log in or Create an account to join the conversation.

More
12 years 1 day ago #25177 by ggppdk
I guess we can load the language file in backend too.

I have added loading of template files in backend template edit form in r1307

inside, administrator/components/com_flexicontent/views/template/view.html.php
i ll add

Code:
if (FLEXI_FISH || FLEXI_J16GE) FLEXIUtilities::loadTemplateLanguageFile( $folder );


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 20 hours ago #25195 by Rehne

ggppdk wrote: I guess we can load the language file in backend too.

I have added loading of template files in backend template edit form in r1307

inside, administrator/components/com_flexicontent/views/template/view.html.php
i ll add

Code:
if (FLEXI_FISH || FLEXI_J16GE) FLEXIUtilities::loadTemplateLanguageFile( $folder );


thanks
tested
but that does not work for me !!?? :?:

and a note
i think the following ('en')
Code:
JFactory::getLanguage()->load($extension, $base_dir, 'en', $reload=true); // Fallback to english language template file

must be ('en-GB')
Code:
JFactory::getLanguage()->load($extension, $base_dir, 'en-GB', $reload=true); // Fallback to english language template file

in components\com_flexicontent\classes\flexicontent.helper.php

Regards

Please Log in or Create an account to join the conversation.

More
12 years 19 hours ago #25196 by ggppdk
Yes , we changed the language to LL-CC (language-country), and i have seen this needed change,

this line is for the fallback language to be English when current language file is not found

but it seems i did not commit it

Fixed in r1311, thanks


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #27984 by Rehne
Hi George,

i am now come back to
to test this function
because iI just created an extensive event-template for FC 2 with a lot of settings
this possibility (own language files for FC templates) would be very handy, especially in backend
but it does not seem to work for me

I tried, as you described it

my-template/language/en-GB/en-GB.ini
my-template/language/fr-FR/fr-FR.ini
my-template/language/de-DE/de-DE.ini
my-template/language/ru-RU/ru-RU.ini

that's right?

I need to know/to do something special?????

Just a note:
i've also take a look in the file
administrator/components/com_flexicontent/views
/template/view.html.php
there is a wrong 'ausdokumentierte' (i don't know in englisch ;) ) code

the code
Code:
// The 'noConflict()' statement is inside the above jquery file, to make sure it executed immediately //$document->addCustomTag('<script>jQuery.noConflict();</script>');

must be
Code:
/* The 'noConflict()' statement is inside the above jquery file, to make sure it executed immediately $document->addCustomTag('<script>jQuery.noConflict();</script>');*/

Regards

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.292 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline