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 8048149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:20:32+00:00 2026-06-05T06:20:32+00:00

I am working on a multilingual iOS/Android app and use a xml file to

  • 0

I am working on a multilingual iOS/Android app and use a xml file to get my translations. The translation function looks for a i18n-xxx class and replaces the text for html elements with that class with the text from the xml file.

Example:

Html:

<a href="url.html" data-role="button" class="i18n-my-button">Button</a>

In the xml file:

<translation id="i18n-my-button">
   <en>Button</en>
   <sv>Knapp</sv>
</translation>

Javascript:

...
$(xml).find("translation").each(function() {
   ...
   var id = $(this).attr("id"); //i18n-my-button
   var translation = $(this).find("sv").text();  //Knapp
   ...
   $("." + id).find("span.ui-btn-text").text(translation);
});

With this approach I am able to translate almost any html element like buttons, radio buttons and check boxes. But I am failing to translate flip toggle switches.

This is how I would like it to be:

<select name="slider" id="flip-a" data-role="slider">
    <option value="off" class="i18n-off">Off</option>
    <option value="on" class="i18n-on">On</option>
</select>

I want to be able to translate “Off” and “On” to “Av” and “På” using the same function as with the other html elements. The problem is jQuery Mobile translates the simple select to a huge block of code, and I have not yet identified what element I should translate and how to do it.

Any suggestions?

  • 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-06-05T06:20:34+00:00Added an answer on June 5, 2026 at 6:20 am

    You could hook into the create event fired when a slider is styled/created by JQM.

    $( ".selector" ).slider({
       create: function(event, ui) { 
          //Do translation here
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on multilingual Asp.NET MVC application. In url i need to use category
I am working on a multilingual website and need to include CSS file based
Working on my first Android app and facing a challenge. I am pulling calls
I'm looking for a way to include multilingual support in an app I'm working
I finally have my multilingual CakePHP 2.1 app almost working. First, I define the
I am working on a multilingual web application. I'm wondering how do i design
I am working on a CMS system tries to support multilingual natively. I have
Working on a rather small, and simple layout, I decided to use Meyer's CSS
I am working on a large multilingual website and I am considering different approaches
I'm working with MVC3 and EF4. I would like to create a multilingual FAQ

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.