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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:58:53+00:00 2026-05-22T15:58:53+00:00

My Google Chome extension makes use of a content script declared in its manifest

  • 0

My Google Chome extension makes use of a content script declared in its manifest via:

  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["js/jquery-1.6.1.min.js", "js/content.js"]
    }
  ],

It also comes with a localization-related resource bundle in _locales/en.

Looking up a key using chrome.i18n.getMessage(...) works flawlessly from general extension code (i.e., in options.html), but it fails (i.e., does not return anything) when executed from js/content.js while that script is being run in the context of the regular web page.

Is this a general limitation (this Chrome bug may be related) or did someone manage to get this working?

  • 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-22T15:58:54+00:00Added an answer on May 22, 2026 at 3:58 pm

    I would say a bug report needs to be created.

    It doesn’t say anywhere that it is supposed to work, but it doesn’t throw an error that chrome.i18n.getMessage isn’t accessible from a content scripts either, as all other API calls do. So that’s a bug already.

    It would be a nice feature to have. I think they started implementing it but either forget or left it for better times. A bug report would be a good reminder.

    Meanwhile, you can get localization strings from a background page through messaging. Perhaps send one request at the beginning of a content script requesting an array of all strings you will need.

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

Sidebar

Related Questions

I'm developing a Google Chrome extension that makes heavy use of the context menu,
In my Google Chrome Extension, I have a Content Script (content.js) and a Background
I would like to write a small Google Chrome extension in which I use
I am developing a Google Chrome extension, and need to use the chrome.experimental.webRequest API.
I just found out that the Screen Capture by Google extension makes my website's
I am trying to use the google tasks api in a chrome extension, but
I'm making a Google Chrome Extension that uses context menus as its main UI.
I'm making a Google Chrome extension. My extension currently extends the content area and
I am using jQuery with a Google Chrome extension popup. The pop-up page uses
I wrote a Google Chrome extension and the site that I want to use

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.