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

  • SEARCH
  • Home
  • 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 6784393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:59:16+00:00 2026-05-26T16:59:16+00:00

I have a really tricky task to do: there is an existing web project

  • 0

I have a really tricky task to do: there is an existing web project (2 HTML files, a few plugins, and one main JavaScript file with about 2000 lines of code) which I now have to localize. No question, this should have been considered earlier, but they just missed it. How would you go to find a solution for that?

There are a few elements with just a few text elements which are exist when the page is initially loaded. But there are also a lot of DOM elements and error alerts which are dynamically appended and removed (using jQuery) on the fly.

I think I’m going to have text resources (which kind of files?) with unique names/numbers on the server (which is .NET/C#). While loading the webpage, I could detect the user-agent’s language and then send that to the server so that “it” prepares the right resources. And then I should have a method like getText(uniqueName) which requests the right text via AJAX from the server. But this would produce a whole lot of AJAX requests.

I’ve only got a few thoughts, but nothing “real” at all yet.

Could you please help around with ideas? What will the server have to handle, what will the script handle, and how?

Thx.

  • 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-26T16:59:17+00:00Added an answer on May 26, 2026 at 4:59 pm

    I use separate .js files like strings-en.js. I load the .js file dynamically based on settings in my user DB.

    Demo: http://jsfiddle.net/ThinkingStiff/uUTkN/

    strings-en.js:

    var STRINGS = {
    
        "userLabel": "username",
        "userPlaceholder": "enter username..."
    
        //...
    
    };
    

    HTML:

    <script src="strings-en.js"></script>
    
    <label id="user-label" for="user"></label>
    <input id="user" />
    

    CSS:

    #user-label::after
    {
    content: ":";  
    }
    

    Script:

    document.getElementById( 'user-label' ).textContent = STRINGS.userLabel;
    document.getElementById( 'user' ).setAttribute( 'placeholder', STRINGS.userPlaceholder );
    

    Output:

    enter image description here

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

Sidebar

Related Questions

I really have big problems with importing an extern C-Library to my existing C++-Project.
I have a really tricky thing going up here. My project has around 100
I have really basic question. How can I get form id by input element
I have really no idea why I'm asking this as this a really completely
Im new to iPhone development and I have really taken this to me. I
I've got a program where a lot of classes have really complicated configuration requirements.
We’ve found that the unit tests we’ve written for our C#/C++ code have really
What should i use to code Classic ASP under Linux. I have really tried
I have some really complicated legacy code I've been working on that crashes when
I have a really big database (running on PostgreSQL) containing a lot of tables

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.