diff --git a/README.md b/README.md index d539756..d3d5e6a 100644 --- a/README.md +++ b/README.md @@ -443,6 +443,12 @@ Note: You can provide the JS file extension (`other-asset-directory/something.js You can specify translations for a JS asset like so: ```php +// Using the default path of 'languages/'. +Asset::add( 'my-thing', 'js/something.js' ) + ->with_translations( $textdomain ) + ->register(); + +// Specifying a different path. Asset::add( 'my-thing', 'js/something.js' ) ->with_translations( $textdomain, 'relative/path/to/json/lang/files' ) ->register();