-
☆ A M B ☆
- 24,524 Posts
Sounds like a job for one of BobRay's getCollection snippets, and I vaguely remember something about using a processor to trigger the usual events.
-
☆ A M B ☆
- 3,112 Posts
@outre99/@kiril,
After digging a bit, "OnDocFormSave" depends on the cloned fields (based on languages) when you open the resource on Manager.
These are what missing when you do the importing manually.
It tries to detect them
if (!preg_match('/_lingua$/', $k)) {
continue;
}
if (!preg_match('/_lingua_tv$/', $k)) {
continue;
}
I'll think about adding a new feature of auto generating the translations based on the main resource (default values).
Please post this issue on
https://github.com/goldsky/lingua/issues
[ed. note: goldsky last edited this post 11 years, 9 months ago.]
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
Thanks Rico.
Issue submitted.
For now i'll fall back to sql inserts for imported resources into lingua tables.
After upgrading to Lingua 2.1.0-beta2 the Frontend doesn't remember the switched language anymore. Only the first switch with lingua.selector is recognized, than the user falls back to default language.
Can anybody help?
-
☆ A M B ☆
- 3,112 Posts
you found a bug.
just hack this:
core/components/lingua/model/lingua/linguarequest.class.php
line 368, comment out the culture key reset.
public function findResource($uri, $context = '') {
$resourceId = $this->modx->findResource($uri, $context);
if (is_numeric($resourceId)) {
// reset the culture key
// $modCultureKey = $this->modx->getObject('modSystemSetting', array('key' => 'cultureKey'));
// $cultureKey = $modCultureKey->get('value');
// $this->lingua->setCultureKey($cultureKey);
} else {
$resourceId = (int) $this->findCloneResource($uri, $context);
}
return $resourceId;
}
You must be having same URIs between languages.
I'll fix this soon.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
-
☆ A M B ☆
- 3,112 Posts
or just download 2.1.0-beta3
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
-
☆ A M B ☆
- 24,524 Posts
Just started working with Lingua. Having a problem with the lingua.selector snippet. On the default (en) page it says "Select Language", but on the other language's pages it says "lingua.select_language". What am I missing? The snippet is called
-
☆ A M B ☆
- 24,524 Posts
Hm. I just installed Lingua 2.1.0beta4, and there is no plugin. 
Ok, uninstalled and removed everything, installed it again and now everything seems to be there.
One very strange thing... I keep getting logged out from the Manager, but only when Lingua is installed.
[ed. note: sottwell last edited this post 11 years, 6 months ago.]
-
☆ A M B ☆
- 24,524 Posts
Interesting. I set up a MODX Cloud dev installation and so far it hasn't logged me out.
Still have the problem with the linga.selector snippet not displaying text for languages other than English.