Skip to main content
Subscribd ships with translations for English, Spanish, French, German, and Chinese (Simplified). All component labels, error messages, and email copy reference these language files, so you can localize the entire billing UI without modifying any views. Publish the files, edit the strings for built-in locales, or add new locale directories for additional languages.

Built-in locales

The following locales are included out of the box:
CodeLanguage
enEnglish
esSpanish
frFrench
deGerman
zh-CNChinese (Simplified)

Publishing language files

Run the publish command to copy all language files into your application’s lang/vendor/subscribd/ directory:
php artisan vendor:publish --tag=subscribd-translations
After publishing, the English strings live at:
lang/vendor/subscribd/en/subscribd.php
Edit any value in that file to override the default text for the English locale. Laravel picks up your overrides automatically — no cache clear is required during local development.

Directory structure

Each locale is a subdirectory under lang/vendor/subscribd/. After publishing, the structure looks like this:
lang/
└── vendor/
    └── subscribd/
        ├── de/
        │   └── subscribd.php
        ├── en/
        │   └── subscribd.php
        ├── es/
        │   └── subscribd.php
        ├── fr/
        │   └── subscribd.php
        └── zh-CN/
            └── subscribd.php

Adding a new locale

1

Publish the language files

If you have not already published, run the publish command above. This gives you the English source file to copy from.
2

Create a new locale directory

Add a directory named after the locale code under lang/vendor/subscribd/. For example, for Portuguese:
mkdir lang/vendor/subscribd/pt
3

Copy the English file as a starting point

cp lang/vendor/subscribd/en/subscribd.php lang/vendor/subscribd/pt/subscribd.php
4

Translate the strings

Open lang/vendor/subscribd/pt/subscribd.php and replace each English value with the translated string. The keys must remain unchanged.
5

Set the locale in your app

Laravel uses the locale configured in config/app.php or set at runtime via App::setLocale('pt'). Subscribd reads the active locale automatically.
To test a translation without changing config/app.php, call App::setLocale('pt') in a middleware or route group that wraps your billing pages.
If a string is missing from your locale file, Subscribd falls back to the English (en) translation automatically.