1
DonXoop
$xoops_langcode available to custom blocks?

I had been wanting to activate multi-language on my site but the member reaction to the question was lukewarm. So I hesitate doing the multi-language core hack mentioned elsewhere (it works).

I can live with the basic language module. This takes care of the basics but I'd like to do a few translations. I'd be happy to translate:
. Custom block(s)
. Main Menu

I can see that {$xoops_langcode} follows my currently selected language. I can't seem to use it to present lang specific content.
<{ if $xoops_langcode == "en" }>
English xxxxx
<{else}>
Other xxxxx
<{/if}>

Something simple like that. I can't seem to find variables other than X_SITEURL for custom blocks. Then I'll want to xlate the main menu...

2
Herko
Re: $xoops_langcode available to custom blocks?
  • 2004/3/9 16:21

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


The 'problem' here is that a custom block is PHP, HTML or text-sanitised text. None of these include the smarty template engine, so smarty variables do not work there.

Herko

3
DonXoop
Re: $xoops_langcode available to custom blocks?

I see. That puts me back to a core hack. With a 2.1 version coming before too long I think I should wait...

It will be nice if a multi language function makes it into the core

Thanks for the reply.

4
Mithrandir
Re: $xoops_langcode available to custom blocks?

_LANGCODE is defined in root/language/[Sel-Language]/global.php and should be usable in custom blocks.

Login

Who's Online

818 user(s) are online (321 user(s) are browsing Support Forums)


Members: 0


Guests: 818


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits