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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:52:25+00:00 2026-06-14T17:52:25+00:00

I am using jquery-localize plugin for my static web project. I can localize strings

  • 0

I am using jquery-localize plugin for my static web project. I can localize strings in html file, like this:

<p rel=localize[hello]></p>

But I also need to use localized strings in js functions.
How can I correctly access those jquery-localize strings from a function?

alert( localized_strings[hello] ??? );

here is the jquery-localize plugin: https://github.com/coderifous/jquery-localize/blob/master/README.markdown

  • 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-14T17:52:26+00:00Added an answer on June 14, 2026 at 5:52 pm

    I’ve no experience with this plugin, but after a look at the code, I believe you can access the data of the loaded package through

    $.localize.data.PACKAGE.KEY
    

    where PACKAGE is the language package you’ve loaded via

    $("[data-localize]").localize("PACKAGE");
    

    and KEY is the whatever key you want to retrieve (in your example hello).

    Since the package is loaded via AJAX you might have to ensure that the data is actually available when you need it. The plugin seems to define a callback method for when the data is loaded an expose it through an option. So you could do something like this:

    $("[data-localize]").localize("PACKAGE", { 
        callback: function(data, defaultCallback) {
            console.log(data.KEY); // <-- do whatever here
            defaultCallback(data);
    }});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery and backbone.js, I would like to separate the JavaScript from the HTML
I am using JQuery Localizer plugin. That plugin has a one function defined like
Using Jquery, how do I find and hide elements like this? <p>MyHeader</p> The only
Using jQuery timepickr: http://archive.plugins.jquery.com/project/jquery-timepickr Having included these files: jquery-1.7.1.min.js jquery-ui-1.8.21.custom.min.js ui.timepickr.js And getting this
Using jquery, how can I change the color of these elements to red if
Using jQuery Nearest Element , I would like to select elements in a circular
Using jQuery, how can I get the selected item's value in a select when
Using jQuery, how can I get the input element that has the caret's (cursor's)
Using jQuery and given this <ul> <li> <a external=http://stackoverflow.com href=home.htm>Link 1</a> </li> <li> <a
Using jquery, how can I find the first div that contains an input with

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.