Hi,
actually, YAMS is a module/snippet/plugin and even a chunk for mm_rules
but, you’re right its plugin part has to be executed before all others
now concerning Treasure Chest (which i haven’t used at all so far) if it is a snippet, you can be sure it is executed after YAMS parsing plugin.
For some other snippets as wayfinder or ditto, yams comes with its own solution work friendly with them, it’s not the case for treasure Chest
SO ?
well, so, yes, a solution would be to introduce YAMS to Treasure chest. The first solution that comes to my mind is, as you suggest, use Ymas inside treasure chest snippet, quite easy to realise, just add
$yams = YAMS::GetInstance();
$langId = $yams->GetCurrentLangId();
at the very top of treasure chest snippet and then look for where it puts or parses chunks and add _$langId (or, in your case, apparently -$langId) to the chunks names in the call should do the trick
Have swing
edited : oops, Susan was faster than me