cotonti.com : Multilanguage and news plugin https://www.cotonti.com Son konu mesajları Cotonti en Thu, 09 Oct 2025 21:56:58 -0000 ez Çrş, 10 Kas 2010 06:07:01 -0000 Trustmaster Çrş, 10 Kas 2010 05:47:23 -0000 ez

I am now adding very nice stuff to the recentitems plugin.
So this will become language aware (as I call it).. (optinal off course)

But I am still wondering.... Why must I make these things..
Shouldn't this be in the standard cotonti package ?? (I mean this is NO rocket science I am making)

What do others think off multilanguage in the default Cot ??


I am asking this because I am making to much 'corehacks', so upgrading will be more difficult for me, and that is something I would like to avoid...

Added 56 days later:

@Trustmaster:

I see in the project tracker that you are starting Internationalization... :D

I have some things already made and some 'good' ideas.
Maybe I can help ?]]>
Sal, 14 Eyl 2010 04:16:44 -0000
Kingsley ]]> Per, 09 Eyl 2010 21:29:43 -0000 ez
Tnx..I am already rewriting the news plugin for language support... ;)
And got it to work!!

Index Template (TPL):
<div class="block">
 {INDEX_NEWS_NL_NL_NEWS}
 {INDEX_NEWS_EN_EN_NEWS}
</div>

In the news.php i do:
  $ttmp=sed_get_news($v[0], "news.".$v[0], $v[1], $dadd, $v[2]);
  $t->assign("INDEX_NEWS_".strtoupper($v[0]), $ttmp);
  //sed_watch("INDEX_NEWS_".strtoupper($usr['lang'])."_".strtoupper($v[0]), $ttmp);
  $t->assign("INDEX_NEWS_".strtoupper($usr['lang'])."_".strtoupper($v[0]), $ttmp);

My pagecategories are named:
en_homepage
en_news
nl_homepage
nl_news

Notice the use of '_' instead of '-'
It turned out that Xtemplate cannot use '-' in the assign ?????


And I got separate tpl files for all separate news cats..
You cannot use the rewrite rules from the i18n example.. it needs '_'.

------------------------------------------------------------------------
Good idea about the original news cat as a fallback, I will use that!

Releasing it will be difficult, because i have a custom news plugin..
I use a half baked 0.9 news plugin with additional hooks and other stuff I changed.]]>
Per, 09 Eyl 2010 17:35:05 -0000
GHengeveld
if (usr.lang != cfg.defaultlang) ...]]>
Per, 09 Eyl 2010 16:09:04 -0000
ez
I have a question...What if I want to use multilanguage news items.

The news plugin lets you use {INDEX_NEWS}, but i really want something like
{INDEX_{PHP.usr.lang}-news} (if you get my drift.. :) )


Where I have the following categories:

nl-news
en-news

What is/are the best way(s) to solve this...

tnx]]>
Per, 09 Eyl 2010 05:11:47 -0000