0
Welcome Guest! Login
0 items Join Now

How to get Joomla’s Current Site Language

  • How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • hi,

      how can i get the current site language with an external php file(on a multi language site)?

      mvg,

      Erwin
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • A google search reveals this topic (see last reply). https://forum.joomla.org/viewtopic.php?t=844514 .

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • hi,

      it doesn't work, I have 4 languages !!!

      mvg,

      Erwin
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • Really this is bespoke development and it's also something that is about Joomla rather than anything to do with RT products. If you google search there are many answers on this... also you can ask in the Joomla forum too.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • hi MrT,

      Yes this is Joomla but I have see this in the Template index.php (gantry->language) and this work perfect.

      mvg,

      Erwin
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • That an internal gantry function and would require that you have loaded gantry in your php program for that to work.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • Hi MrT,

      Yes it is on a joomla website with rt_hadron template.
      and now I have this php file in the direction of the website.

      You are not authorised to see this attachment.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • I've no idea what you are showing me there?

      You need to load gantry with a require statement as the index.php of the template does.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • Hi MrT,

      I have an Another question, can I this in an artikel with php?
      I have a plugin(php) for artikels.

      mvg,

      Erwin
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: How to get Joomla’s Current Site Language

    Posted 7 years 10 months ago
    • no because the gantry framework is already loaded and your php inside an article won't have access to those functions.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.081 seconds