Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get_i18n_component problem
#1
Hi guys,

if I use multi language components and i put get_i18n_component in my template, i get the correct output but afterwards theres alwas a 1 on my page.

Safari says the 1 is a Nodelist with data 1. This is with all of my components.

If i use the standard get_component... the problems not there. Any idea?

thanks
Reply
#2
Could it be you are using it like echo get_i18n_component(...) instead of get_i18n_component(...)? (without echo)
Reply
#3
(2013-06-25, 19:16:01)Carlos Wrote: Could it be you are using it like echo get_i18n_component(...) instead of get_i18n_component(...)? (without echo)

get_i18n_component (in contrast to get_component) returns true/1, if the component exists. This allows you to use code like the following:
Code:
get_i18n_component('sidebar-'.return_page_slug()) || get_i18n_component('sidebar-default')
(display the page specific side bar, or - if it does not exist - the default side bar)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#4
You are right. Thanks would have searched long to solve this problem.
Thanks for your help.
Reply




Users browsing this thread: 1 Guest(s)