PHPackages                             awkwardideas/langjs - 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. awkwardideas/langjs

ActiveLibrary

awkwardideas/langjs
===================

Compile lang files to be used within js

v1.0.0(9y ago)5159MITPHPPHP &gt;=5.6.4

Since Mar 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/awkwardideas/LangJS)[ Packagist](https://packagist.org/packages/awkwardideas/langjs)[ RSS](/packages/awkwardideas-langjs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

LangJS: Compile lang files to a js file for use on client side
==============================================================

[](#langjs-compile-lang-files-to-a-js-file-for-use-on-client-side)

[![Latest Stable Version](https://camo.githubusercontent.com/3c3a0e045e139aae9799a99d2dc5cbd51e0aa9d20311195ce98db51726585af3/68747470733a2f2f706f7365722e707567782e6f72672f61776b7761726469646561732f6c616e676a732f762f737461626c65)](https://packagist.org/packages/awkwardideas/langjs)[![Total Downloads](https://camo.githubusercontent.com/25aea1efaa9efdbc9d3d70a13503d52e04a491fbaca3b262439202c50545df9e/68747470733a2f2f706f7365722e707567782e6f72672f61776b7761726469646561732f6c616e676a732f646f776e6c6f616473)](https://packagist.org/packages/awkwardideas/langjs)[![Latest Unstable Version](https://camo.githubusercontent.com/094f182b07a273b9652fc737e82b07e157126d9751f2986b40f1c60dde6d3293/68747470733a2f2f706f7365722e707567782e6f72672f61776b7761726469646561732f6c616e676a732f762f756e737461626c65)](https://packagist.org/packages/awkwardideas/langjs)[![License](https://camo.githubusercontent.com/fc0870492d0e2bc69275d4df33cea52c113ff6374281a8534d71b310c8657cef/68747470733a2f2f706f7365722e707567782e6f72672f61776b7761726469646561732f6c616e676a732f6c6963656e7365)](https://packagist.org/packages/awkwardideas/langjs)

Install Via Composer
--------------------

[](#install-via-composer)

composer require awkwardideas/langjs

Add to config/app.php
---------------------

[](#add-to-configappphp)

Under Package Service Providers Add

AwkwardIdeas\\LangJS\\LangJSServiceProvider::class,

Build LangJS script file
------------------------

[](#build-langjs-script-file)

1. run `php artisan langjs:build --d js/LangJS.js`
2. Adjust the --d path to whatever you would like under your public directory
3. Include this script file into your layout

- *You must run the build command any time you want to recompile the language file changes. A watchdog may be built in the future but is not currently available*
- *This only compiles the lang files within your resources/lang folder. Vendor lang files are not included currently.*

Javascript commands
-------------------

[](#javascript-commands)

- `_lang(key [, replace, locale])`

    - Same setup as `@lang('auth.user')`, will retrieve your language for password which you put in your php lang file auth.php.
    - Replace and locale are optional parameters
    - Locale will default to en, if not provided.
    - If key has a plural form, the singular version will be returned, instead of the full term value
- `_choice(key, number [, replace, locale])`

    - Same setup as `@choice('auth.user',2)`
    - Replace and locale are optional parameters
    - Locale will default to en, if not provided.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3356d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/771bc8e6daa6dea7b49ed5a97d38e0aa83c2abd0d32a97074d2eebac40383c49?d=identicon)[awkwardideas](/maintainers/awkwardideas)

### Embed Badge

![Health badge](/badges/awkwardideas-langjs/health.svg)

```
[![Health](https://phpackages.com/badges/awkwardideas-langjs/health.svg)](https://phpackages.com/packages/awkwardideas-langjs)
```

PHPackages © 2026

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