Git Product home page Git Product logo

skillshare / formatphp Goto Github PK

View Code? Open in Web Editor NEW
74.0 29.0 5.0 648 KB

๐ŸŒ Internationalize PHP apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.

Home Page: https://docs.formatphp.dev

License: MIT License

PHP 97.99% HTML 0.06% JavaScript 1.95%
i18n l10n string-extraction php translation internationalization localization intl formatphp globalization

formatphp's People

Contributors

dependabot[bot] avatar ramsey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

formatphp's Issues

Compile to FormatJS compiled format with `formatphp compile` CLI command

Compile to FormatJS compiled format with formatphp compile CLI command

We already have the compilation capability built-in to FormatPHP, for validation purposes. We should expose this to users through a formatphp compile command that works similarly to the formatjs compile command.

This will enable sharing the same translation files across front-end and back-end code.

Background/problem

FormatJS has a special compilation step that helps improve performance and efficiency internally, since it's a type of AST for translation strings. You can read more about the compile command here:

FormatPHP already implements the same AST compilation process in order to validate messages. We need to expose this as a compile command to output the AST and save to a file. With this functionality, users could merge their translation files to usethe same ones for front-end and back-end.

Proposal/solution

Add a compile command to the FormatPHP CLI tool that mirrors the functionality of the FormatJS command of the same name: https://formatjs.io/docs/tooling/cli#compilation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.