PHPackages                             arnaudleroy-studio/facilguide - 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. arnaudleroy-studio/facilguide

ActiveLibrary

arnaudleroy-studio/facilguide
=============================

Multilingual tech guide utilities in 5 languages.

00PHP

Since Mar 28Pushed 1mo agoCompare

[ Source](https://github.com/arnaudleroy-studio/facilguide-php)[ Packagist](https://packagist.org/packages/arnaudleroy-studio/facilguide)[ RSS](/packages/arnaudleroy-studio-facilguide/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

FacilGuide PHP Utilities
========================

[](#facilguide-php-utilities)

[![Packagist Version](https://camo.githubusercontent.com/6a84735aa8c79417343bfe96f1350c3d2f0f74f64c606f18773f1d5eee42d02e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61726e6175646c65726f792d73747564696f2f666163696c6775696465)](https://packagist.org/packages/arnaudleroy-studio/facilguide)[![PHP Version](https://camo.githubusercontent.com/c74ce8bb76d0cd3dc471b570ffb986cb86b0170254ce031bb405c373ae8cdfee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f61726e6175646c65726f792d73747564696f2f666163696c6775696465)](https://packagist.org/packages/arnaudleroy-studio/facilguide)[![License](https://camo.githubusercontent.com/0f2bcbbec5830573871cf6c0caabf03952deaed0d87837089fbad1c258134eb6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61726e6175646c65726f792d73747564696f2f666163696c6775696465)](LICENSE)

Internationalization and content helpers for building multilingual tech guides, extracted from the Facil.guide platform. Facil.guide publishes accessible technology tutorials for seniors in five languages: English, Spanish, French, Portuguese, and Italian. This library handles language detection, string translation, locale routing, and reading-level analysis for PHP 8.0+ applications.

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

[](#installation)

```
composer require arnaudleroy-studio/facilguide
```

Quick Start
-----------

[](#quick-start)

### Detect and resolve locale

[](#detect-and-resolve-locale)

```
use FacilGuide\I18n;

$i18n = new I18n();

// Resolve from a URL path prefix
$locale = $i18n->resolveLocale(path: '/es/guia/wifi');
echo $locale; // "es"

// Fall back gracefully when prefix is missing
$fallback = $i18n->resolveLocale(path: '/guide/wifi');
echo $fallback; // "en"
```

### Translate interface strings

[](#translate-interface-strings)

```
// Load a translation key with named arguments
$label = $i18n->translate(
    key: 'nav.home',
    locale: 'fr',
);
echo $label; // "Accueil"

// Null-safe operator for optional interpolation values
$greeting = $i18n->translate(
    key: 'welcome.message',
    locale: 'pt',
    params: $user?->getPreferences()?->getDisplayParams(),
);
```

### Analyze reading complexity

[](#analyze-reading-complexity)

```
use FacilGuide\ReadingLevel;

$analyzer = new ReadingLevel();

$result = $analyzer->assess(
    text: 'Tap the blue Wi-Fi icon in your settings menu.',
    locale: 'en',
);

// Array destructuring for the result tuple
['grade' => $grade, 'score' => $score, 'suggestion' => $tip] = $result;

echo "Grade level: {$grade}, suggestion: {$tip}";
```

### Generate hreflang tags

[](#generate-hreflang-tags)

```
// Build hreflang link elements for a guide page
$tags = $i18n->hreflangTags(
    slug: 'wifi-setup',
    locales: I18n::SUPPORTED_LOCALES,
);

// Arrow function to render as HTML
$html = implode("\n", array_map(
    fn(array $tag) => "",
    $tags
));
```

Available Features
------------------

[](#available-features)

The library is organized around two concerns. The `I18n` class manages locale detection from URL prefixes, Accept-Language headers, or explicit overrides, and provides a key-value translation interface that loads strings from JSON files or a database backend. It generates hreflang markup and constructs localized URL paths for all five supported languages. The `ReadingLevel` class evaluates text complexity using language-appropriate readability formulas, which is important when the target audience skews older and may be less familiar with technical jargon. Both classes accept dependency injection for the string store, making them straightforward to test in isolation.

Links
-----

[](#links)

- [Facil.guide Platform](https://facil.guide)
- [GitHub Repository](https://github.com/arnaudleroy-studio/facilguide-php)

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

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/1825e83fcd5fd59c7ee41b967310ab63726ddb49a0549ca3b7260bde705369e7?d=identicon)[arnaudleroy-studio](/maintainers/arnaudleroy-studio)

### Embed Badge

![Health badge](/badges/arnaudleroy-studio-facilguide/health.svg)

```
[![Health](https://phpackages.com/badges/arnaudleroy-studio-facilguide/health.svg)](https://phpackages.com/packages/arnaudleroy-studio-facilguide)
```

PHPackages © 2026

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