[IMPLEMENTED] Templates need language files

More
12 years 3 months ago #27992 by ggppdk
You are right it does not work in backend because the calculated path is wrong (it adds administrator to it ...)

-- Please edit components/com_flexicontent/classes/flexicontent.helper.php
replace line, (inside function loadTemplateLanguageFile()):
Code:
$base_dir = JPATH_COMPONENT.DS.'templates'.DS.$tmplname;
with
Code:
$base_dir = JPATH_COMPONENT_SITE.DS.'templates'.DS.$tmplname;

-- I will commit fix, thanks for the report

NOTE:

FLEXIUtilities::loadTemplateLanguageFile( $folder );
is called by view.html.php for
- frontend item view
- frontend category view
- backend template view (for use in template edit form)

Also I took opportunity to copy this info to a new FAQ article:
Adding language files to your template


-- 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 3 months ago #28006 by Rehne
Hello George,

first again ... thanks ...

i download/tested r1455
even so, it still does not work
(both ... in the frontend and the backend)

Regards

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

More
12 years 3 months ago #28012 by ggppdk
mmm, i see that the language files need to be loaded in more places ...

First tell me in which frontend/backend view (and which file) you are trying to use the language strings
e.g. backend Content Type Edit form ?

are you also placing your string in the XML files too?


-- 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 3 months ago #28015 by Rehne

ggppdk wrote: First tell me in which frontend/backend view (and which file) you are trying to use the language strings
e.g. backend Content Type Edit form ?


backend:
categorie edit form
item edit form

Rehne wrote: are you also placing your string in the XML files too?

mmm ... no ... i will try it

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

More
12 years 3 months ago #28017 by ggppdk
mmm, template language files are not loaded for these forms,

they are load for
- frontend item view
- frontend category view
- backend template edit form
- before parsing XML files of templates,
(i think have missed this one, i will add)
since this is needed for using language strings for parameter NAMES of custom templates:

the templates have their customizable parameters in files item.xml (item view) and category.xml (category view)

If you add loading of template files in category edit form and item edit form , it will cause inconsistent behaviour if you use language strings inside e.g. form.php file, because as soon as user changes the template layout , your language strings will no longer be loaded


-- 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 3 months ago #28018 by Rehne
Hi George,

ggppdk wrote: are you also placing your string in the XML files too?


like this
Code:
<languageitem> <file>language/de-DE/de-DE.ini</file> <file>language/en-GB/en-GB.ini</file> </languageitem>

or this
Code:
<languageitem> <folder>language</folder> </languageitem>

ggppdk wrote: the templates have their customizable parameters in files item.xml (item view) and category.xml (category view)

exactly this one
i want to store in a language file

ggppdk wrote: If you add loading of template files in category edit form and item edit form , it will cause inconsistent behaviour if you use language strings inside e.g. form.php file, because as soon as user changes the template layout , your language strings will no longer be loaded

mmm...
i do not understand fully
so it is not possible?

Regards

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.554 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