We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would be great to include a utility to overlay translations onto DOM, as per https://github.com/projectfluent/fluent.js/wiki/DOM-Overlays.
Obviously in PHP we work with HTML strings rather than the DOM itself, so the API would be slightly different.
In my abandoned fluent-php library, I had a 1:1 port of this functionality working with this API:
Overlay::translateHtml( '<p><img data-l10n-name="world" src="world.png"></p>', [ 'value' => 'Hello, <img data-l10n-name="world" alt="world">!', 'attributes' => ['title' => 'Hello'] ] ); // → <p title="Hello">Hello, <img data-l10n-name="world" alt="world" src="world.png">!</p>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Would be great to include a utility to overlay translations onto DOM, as per https://github.com/projectfluent/fluent.js/wiki/DOM-Overlays.
Obviously in PHP we work with HTML strings rather than the DOM itself, so the API would be slightly different.
In my abandoned fluent-php library, I had a 1:1 port of this functionality working with this API:
The text was updated successfully, but these errors were encountered: