utilisation de Translation group

More
11 years 8 months ago #27871 by blade3
haaaaa... i've found the bug... I think..

I suppose that joomla (or flexicontent) use
Code:
substr(strtolower($row["shortcode"]),0,2);
where $row is the result of something like that:
Code:
'SELECT * FROM #__languages WHERE code like "' . $this->language . '"';
.

en-GB is default site language.

So .. if I've 3language : en-GB and en-US and fr-ca.

The traduction works properly now between fr-ca and en-GB items.
Inside fr-ca i can select my en-GB items.

But when I'm inside the en-US the template said:

"Current content item is the Original Content of the Translation Group"

So my theory is realistic?

and this is a problem of Flexicontent, Joomla or in my head?

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

More
11 years 8 months ago #27885 by blade3
after many test,
I've see on the:
/administrator/components/com_flexicontent/views/item/tmpl/default.php

some code like:
Code:
163. $itemlang = substr($this->row->language ,0,2); 164. if (isset($this->row->item_translations)) foreach ($this->row->item_translations as $t) if ($t->shortcode==$itemlang) {$itemlangname = $t->name; break;}

and
Code:
403. if ( $this->row->id && (substr(flexicontent_html::getSiteDefaultLang(), 0,2) == substr($this->row->language, 0,2) || $this->row->language=='*') ) :

i can modify this to
Code:
163. $itemlang = $this->row->language; 164. if (isset($this->row->item_translations)) foreach ($this->row->item_translations as $t) if ($t->shortcode==$itemlang) {$itemlangname = $t->name; break;} 403. if ( $this->row->id && (flexicontent_html::getSiteDefaultLang() == $this->row->language || $this->row->language=='*') ) :


also modify parentclassitem.php on model :
Code:
582. $item_lang = substr($item->language ,0,2);
to
Code:
582. $item_lang = $item->language;

So, I should be modify others models and view but i don't know them. ;-)

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

More
11 years 8 months ago #27891 by ggppdk
Please do not make these changes, these code should not be modified.

I missed the forum post above that you mention WHY you are doing this?

ALSO note the item Language ALL cannot be associated with any other language, because it is meant for ALL languages, this is standard J2.5 behavior too, for e.g. menu items, modules, etc

So if you have a content that you want to associate with other items then set it not to have language ALL, but set it the correct language e.g. English, then you can associate it with other items


-- 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 #27892 by blade3
humm..

for example my website have many english language:
    english canada
    english usa
    english UK
And many french language:
    french canada
    french France

And each of country have many differente content, price, features.

Associated menu works with any language(country).
but not flexicontent..

this is why we need get the "language", not only with 2 first value but all of them.

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

More
11 years 8 months ago #27894 by ggppdk
mmm,
i have thought of exactly this need before, now it has appeared in your site,
just this was not supported in J1.5 100% , plus one or two other reason, i decided not to support it yet

if you want to make tests with this,
go ahead,
but to support this, many files must be changed

at least, recent versions has unified retrieving the language code, and other language data,
inside file
components/com_flexicontent/classes/flexicontent.helper.php,

so it will be easier to support this in the future

if it is not important maybe avoid/postponing do this?


-- 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 5 months ago #31307 by ggppdk
This may be of interest:

IN r1469:
+ Added 2 new ACL privileges:

(a) Edit field value ACL permission e.g. for subscription sites, where specific fields are editable by some user groups only

(b) Associate any translation ACL permission, for site that have different
authors per language


-- 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.

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