Announcement

Collapse
No announcement yet.

how to display specific content as per site langauge

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kh99
    replied
    Yes, that should work.

    Leave a comment:


  • Farid Helal
    replied
    Originally posted by kh99 View Post


    No, it doesn't work in general. You need to know of a variable that you can check. LANGUAGEID is defined somewhere in the initialization code, so you can use that anywhere. There is a global $forumid that is available in a lot of scripts where a forum is involved, but since it's a variable and not a defined constant, it has to be registered to the template (for vb4), or else you'd need to use $GLOBALS['forumid'].
    Please advice me;
    you mean we can do it like this=
    code]<vb:if condition= "$GLOBALS['forumid'] == 1">
    My content
    </vb:if>
    [/code]

    thank you

    Leave a comment:


  • kh99
    replied
    Originally posted by Farid Helal View Post

    Is this applied also to any condition?
    Example :display content per forum
    code]<vb:if condition="FORUMID == 1">
    My content
    </vb:if>
    [/code]

    Thank you aagain

    No, it doesn't work in general. You need to know of a variable that you can check. LANGUAGEID is defined somewhere in the initialization code, so you can use that anywhere. There is a global $forumid that is available in a lot of scripts where a forum is involved, but since it's a variable and not a defined constant, it has to be registered to the template (for vb4), or else you'd need to use $GLOBALS['forumid'].

    Leave a comment:


  • Farid Helal
    replied
    Originally posted by kh99 View Post
    I think maybe what you want is to check LANGUAGEID, like
    Code:
    <vb:if condition="LANGUAGEID == 1">
    English content
    </vb:if>
    Is this applied also to any condition?
    Example :display content per forum
    code]<vb:if condition="FORUMID == 1">
    My content
    </vb:if>
    [/code]

    Thank you aagain

    Leave a comment:


  • Farid Helal
    replied
    Originally posted by kh99 View Post
    I think maybe what you want is to check LANGUAGEID, like
    Code:
    <vb:if condition="LANGUAGEID == 1">
    English content
    </vb:if>
    You posted in the vb3 section but that's vb4 template syntax. But I don't think it matters, I think it's still LANGUAGEID.


    Thank you
    This is what I wanted , and it is for vb4

    Leave a comment:


  • kh99
    replied
    I think maybe what you want is to check LANGUAGEID, like
    Code:
    <vb:if condition="LANGUAGEID == 1">
    English content
    </vb:if>
    You posted in the vb3 section but that's vb4 template syntax. But I don't think it matters, I think it's still LANGUAGEID.

    Leave a comment:


  • Trevor Hannant
    replied
    What exactly are you trying to do and where?

    Leave a comment:


  • how to display specific content as per site langauge

    what is the language variable to use in the condition <vb:if condition=" ">
    for my site
    English id = 1
    Arabic id= 3

    like this condition :
    <vb:if condition="is_member_of($bbuserinfo, 6, 42)">
    {vb:rawphrase staff_section}
    </vb:if>

    Thank you

Related Topics

Collapse

  • ercule
    ad manager in site builder
    by ercule
    Ads don't seem to work properly when we add a conditional (from the list) in first post.
    For instance if I want to display an add in Forum 1 and another add in Forum 2, it doesn't work. No ad are...
    Fri 28 Sep '12, 12:43am
Working...
X