PHP code example of inweb / metadata

1. Go to this page and download the library: Download inweb/metadata library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

inweb / metadata example snippets

 php
'aliases' => [
    // ...
    'TranslationsParser' => InWeb\TranslationsParser\TranslationsParserFacade::class
],
 bash
php artisan vendor:publish --provider="InWeb\TranslationsParser\TranslationsParserServiceProvider"
 php
\Config::set('translations-parser.locales', [
    'en',
    'fr
]);
 bash
php artisan translations:parse
 bash
php artisan translations:parse --force
 php
TranslationsParser::parse('<div>@lang("Phrase")</div>');
// ['Phrase']
 php
TranslationsParser::getParsed('en');
 php
TranslationsParser::save('en', [
    'Phrase'
]);

// Or with values
TranslationsParser::save('en', [
    'Phrase' => 'Value'
]);
 php
TranslationsParser::save('en', [
    'Phrase' => 'Value'
], true);
 php
TranslationsParser::translate('en', 'Phrase', 'Translation');