Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6899903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:28:48+00:00 2026-05-27T07:28:48+00:00

Hi guys i have a form in php which can be rendered in many

  • 0

Hi guys i have a form in php which can be rendered in many languages.
I’m doing this by using a language class which takes the text from a file on the server and returns it where i need:
$lang = new Lang("en"); and then i use $lang->GetText('my_index') when i display the form on the page.
I want to create a dropdown with languages and when the user selects another language, all the texts displayed by my $lang object to be refreshed with the according values of the selected language.
Normally i would use $_GET[‘country_code’] in my script and do $lang = new Lang($_GET['country_code']); but i want to do this with Ajax so that page doesn’t refresh.

All the Ajax examples i found on the internet were just updating the inner html of a div, select, whatever with the response text received from the php script called in the AjaxRequest but i want to update my $lang variable and redisplay my page so that the language changes.

Thanks a lot 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:28:49+00:00Added an answer on May 27, 2026 at 7:28 am

    It seems to me that if you want to ‘redisplay the page’ then you don’t want to be using ajax. Ajax is used to update single aspects of a page in one go, so updating the single div or container is exactly what you want to do.
    If you’re using an MVC framework then partial views are great for this as they render single sections of HTML which you can then just drop that in within the callback function on your AJAX call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

guys i have arrays in which i have to match this kind of text
hey guys I have the follow code in js: $(document).ready(function(){ $(.replyLink).click(function(){ $(#form-to-+this.id).html(htmlForm()).toggle(500); return false;
I'm using php,html,javascript,mysql. My functionality goes like this. I have a division made in
I have a function which sends specified form data to a php processing page.
can't find an answer to this one... I have a form that detects changed
Thus far you guys have been wildly helpful with me getting this little ditty
Hi guys I have a weird question, I have a cli php script runs
Guys i have a little problem when i submit my form the page gets
Hey guys I have a system where there is one form for each friend
Hey guys, if anybody can help me out i'd love it... What i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.