PHPackages                             nepoh/enable-js-message-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nepoh/enable-js-message-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

nepoh/enable-js-message-bundle
==============================

Symfony Bundle for displaying a message when JavaScript is disabled in a user's browser.

07PHP

Since Jun 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Nepoh/EnableJsMessageBundle)[ Packagist](https://packagist.org/packages/nepoh/enable-js-message-bundle)[ RSS](/packages/nepoh-enable-js-message-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Enable JavaScript Message Bundle
================================

[](#enable-javascript-message-bundle)

This bundle allows to easily display a message if javascript is not available in the user's browser. A link to  is added where users can find instructions on how to enable javascript in their browsers.

Installation
------------

[](#installation)

Install via composer:

```
# composer require nepoh/enable-js-message-bundle

```

Enable the bundle:

```
// app/AppKernel.php

// ...
new \Nepoh\EnableJsMessageBundle(),
// ...

```

Usage
-----

[](#usage)

The bundle registers the Twig function `nepoh_enable_js_message` to display the message.

Examples:

```
{{ nepoh_enable_js_message() }}

{# set the locale to be used #}
{{ nepoh_enable_js_message('it') }}

{# set the format (e.g. plaintext) #}
{{ nepoh_enable_js_message(null, 'txt') }}

```

Or you can use the service `nepoh_enable_js_message` (in your controller or elsewere):

```
// Nepoh\EnableJsMessageBundle\Service\EnableJsMessageServiceInterface
$service = $this->get('nepoh_enable_js_message');

$messageHtml = $service->renderMessage();

// or with optional parameters
$italianMessagePlaintext = $service->renderMessage('it', 'txt');

```

If you don't have TWIG installed, the message will allways be plain text.

Configuration
-------------

[](#configuration)

```
// app/config.yml

nepoh_enable_js_message:
    url: http://enable-javascript.com/%locale%/
	# the default locale
    locale: %locale%
	# all supported locales
    locales: ['en', 'hr', 'de', 'nl', 'es', 'pt', 'it', 'no', 'ru', 'fr', 'cz', 'ja', 'ko', 'hu', 'th', 'ph', 'tr', 'id', 'sk', 'pl', 'ar', 'ur']
    fallback_locale: en
    # set your own template or use one of this bundle's TWIG templates: "default" or "bootstrap" (renders a Twitter Boostrap alert)
	template: ~

```

Credits
-------

[](#credits)

I used the translated messages from \[\] - see their website for a list of contributors.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/17e4fbe96c961a3fb1c7c0c1176b6b8d0243f656f7c4ffe44438861e7f5aa2d4?d=identicon)[Nepoh](/maintainers/Nepoh)

### Embed Badge

![Health badge](/badges/nepoh-enable-js-message-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nepoh-enable-js-message-bundle/health.svg)](https://phpackages.com/packages/nepoh-enable-js-message-bundle)
```

###  Alternatives

[nebkam/symfony-traits

Helper trait to ease writing APIs in Symfony

156.7k](/packages/nebkam-symfony-traits)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
