FormatPHP Logo
  • Getting Started
    • Requirements
    • Install With Composer
    • Using FormatPHP
  • Formatting Strings
    • Formatting Messages
      • formatMessage()
      • Placeholders
      • Pluralization and Complex Arguments
      • Localization
      • Rich Text Formatting (Use of Tags in Messages)
    • Formatting Dates & Times
      • Formatting Dates
      • Formatting Times
    • Formatting Numbers & Currency
      • Formatting Numbers
      • Formatting Currency
    • Formatting Display Names
      • Localize a Language Name
      • Localize a Currency Name
      • Localize a Region Name
      • Localize a Script Name
  • Extracting & Loading Strings
    • Using the Console Command To Extract Messages
    • Using MessageLoader to Load Messages
    • Testing With Pseudo Locales
  • TMS Support
    • Custom Formatters
  • Reference
    • Intl\DateTimeFormatOptions
      • General Formatting
      • Specific Formatting
      • Additional Options
    • Intl\DisplayNamesOptions
    • Intl\NumberFormatOptions
      • Notation & Style
      • General Options
      • Fraction Options
      • Currency Options
      • Unit Options
      • Compact Options
  • Copyright
FormatPHP
  • »
  • FormatPHP Manual
  • Edit on GitHub

FormatPHP Manual

For skillshare/formatphp stable. Updated on 2022-06-15.

This work is licensed under the Creative Commons Attribution 4.0 International license.

Welcome!

Inspired by FormatJS and ECMAScript 2023 Internationalization API (ECMA-402), FormatPHP provides an API to format dates, numbers, and strings, including pluralization and translation. FormatPHP is powered by PHP’s intl extension and integrates with Unicode CLDR and ICU Message syntax standards. It requires libicu version 69.1 or higher.

Contents

  • Getting Started
    • Requirements
    • Install With Composer
    • Using FormatPHP
  • Formatting Strings
    • Formatting Messages
    • Formatting Dates & Times
    • Formatting Numbers & Currency
    • Formatting Display Names
  • Extracting & Loading Strings
    • Using the Console Command To Extract Messages
    • Using MessageLoader to Load Messages
    • Testing With Pseudo Locales
  • TMS Support
    • Custom Formatters
  • Reference
    • Intl\DateTimeFormatOptions
    • Intl\DisplayNamesOptions
    • Intl\NumberFormatOptions
  • Copyright

Indices and Tables

  • Index

  • Search Page

Next

© Copyright 2021-2022, Skillshare, Inc. Revision 34e1e7ac.

Read the Docs v: stable
Versions
latest
stable
1.0.1
1.0.0
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds