Download the PHP package developernauts/nativephp-mobile-locales without Composer

On this page you can find all versions of the php package developernauts/nativephp-mobile-locales. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nativephp-mobile-locales

NativePHP Mobile Locales

Latest Version on Packagist Total Downloads

Declare the locales your NativePHP mobile app supports — once — and have the plugin wire the platform-native configuration on every iOS and Android build.

Build-time only. This plugin runs during php artisan native:run. It writes native config files into the generated iOS and Android projects. It does not run at runtime, ship translations, switch locales, or persist user preferences.

Requirements

Features

Installation

Register the plugin with NativePHP:

Publish the config file:

Configuration

config/mobile-locales.php

Use BCP 47 tags (en, pt-BR, en-GB). Region subtags are optional. Tags are normalized automatically — en_gb, EN-GB, and en-GB resolve to the same entry.

Native Platform Language Support

The plugin automatically syncs your configured locales into the native iOS and Android projects so the operating system can properly recognise which languages your app supports — without any manual Xcode or Android Studio configuration.

iOS App Store Language Display

iOS reads the CFBundleLocalizations entries written to Info.plist and surfaces them in Settings and on the App Store listing.

iOS language settings showing supported app languages

iOS App Store language list populated from configured locales

Android App Language Support

Android 13+ uses locales_config.xml to populate the per-app language picker in system Settings, allowing users to override the app language independently of the system locale.

Android per-app language settings populated from locale_config.xml

When are locale files generated?

The sync commands run automatically as a pre_compile plugin hook during:

After native:install --force the native project files are reset to their template state. The locale files will be restored on the next build/run/bundle.

Generating locale files locally

To inspect or verify the generated files without running a full build, the sync commands can be run directly:

How it works

On every build, the plugin reads the locales array and writes the platform-native equivalent into the generated native projects.

iOS

nativephp/ios/NativePHP/Info.plist

Android

nativephp/android/app/src/main/res/xml/locales_config.xml

nativephp/android/app/src/main/AndroidManifest.xml

BCP 47 (en-GB) is automatically converted to Android's resource qualifier format (en-rGB). Keep your config in BCP 47.

Testing

The test suite covers locale normalisation, BCP 47 → platform-native format conversion, XML write/update logic for all three config files, platform routing, and idempotency.

Notes

[!NOTE] Running php artisan native:plugin:validate will report two warnings for this plugin:

  • No bridge_functions defined in manifest
  • No native code directories found (resources/android or resources/ios)

Both are expected. This plugin ships no bridge functions and no native code — it works entirely through a pre_compile hook that writes config files into the generated native projects. The warnings do not affect functionality.

License

The MIT License (MIT). See LICENSE.md.


All versions of nativephp-mobile-locales with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-dom Version *
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package developernauts/nativephp-mobile-locales contains the following files

Loading the files please wait ...