[IMPLEMENTED] Templates need language files

More
13 years 6 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 review. Thanks!

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

More
13 years 6 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
13 years 6 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 review. Thanks!

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

More
13 years 6 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.

More
13 years 6 months ago #28019 by ggppdk
ooh, no you do not need to declare language files inside the XML files,

i meant only having language strings for parameter names of parameters inside the XML files
e.g.
<field name="num_cols" type="text" default="3" label="THIS_IS_LANG_STRING" description="THIS_IS_LANG_STRING_DESC" />

about category / item edit form i meant that maybe it is problematic to load language strings this way, what about a "Language Override Tab" in Global parameters to place extra language strings or override existing ones?


-- 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 review. Thanks!

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

More
13 years 6 months ago #28021 by ggppdk
In r1456,
I have improved loading of flexicontent template language files to
- load a single file for frontend category/item views,
- load all language files for various edit forms (e.g. category edit form, item edit form, content type edit form) this way the parameters of your custom templates will appear translated.
But note you should HAVE DIFFERENT LANGUAGE strings if names of parameters need to be different, because if a language string appears in 2 custom templates then the last file to load will take precedence.
e.g. language string "MYNOTE1" should not be in 2 language files UNLESS you want it to be the same ...


I have upgraded the site you have PM-ed me please test


-- 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 review. Thanks!

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

More
13 years 6 months ago #28025 by Rehne
Hi George,

fantastic
it seems to work :D
i'm going to do some more tests

ggppdk wrote: But note you should HAVE DIFFERENT LANGUAGE strings if names of parameters need to be different, because if a language string appears in 2 custom templates then the last file to load will take precedence.
e.g. language string "MYNOTE1" should not be in 2 language files UNLESS you want it to be the same ...


that's absolutely ok
and i think also clearly

big thanks :!:

Regards

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

Moderators: vistamediajoomlacornerggppdk
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
Save