Git Product home page Git Product logo

apiclientlocalization's Introduction

Api Client Localization Package

Helper package for localization of API Clients, to be used in Frontend Servers

1. Installation

1.1 Setup your project's composer.json

Add repository containing this package

    "repositories": [{"type": "composer", "url": "http://your.resource.url"}],

(Note: you need to have access to this repository as well as to resources it points to)

Set minimum stability to 'dev':

    "minimum-stability": "dev"

1.2 Add dependency to this package under "require" key of your project's composer.json

    "subscribo/apiclientlocalization": "@dev"

and update composer

    composer update

1.3 To register ApiClientLocalizationServiceProvider with Laravel (5.0)

add following under 'providers' key in config/app.php file:

    '\\Subscribo\\ApiClientLocalization\\Integration\\Laravel\\ApiClientLocalizationServiceProvider',

or (for conditional registration) you can add following to bootstrap/app.php:

    if (class_exists('\\Subscribo\\ApiClientLocalization\\Integration\\Laravel\\ApiClientLocalizationServiceProvider')) {
        $app->register('\\Subscribo\\ApiClientLocalization\\Integration\\Laravel\\ApiClientLocalizationServiceProvider');
    }

1.4 To publish default configuration (possibly also config tagged files from other packages) to application run

    php artisan vendor:publish --tag config

or (to force overwrite existing file, and only from this package)

    php artisan vendor:publish --tag="config" --provider="\\Subscribo\\DevelopmentSeeder\\Integration\\Laravel\\ApiClientLocalizationServiceProvider" --force

1.5 Publishing Views

for publishing package views your can run

    php artisan vendor:publish --tag view

or (to force overwrite existing files, and only from this package)

    php artisan vendor:publish --tag="view" --provider="\\Subscribo\\ApiClientCommon\\Integration\\Laravel\\ApiClientLocalizationServiceProvider" --force

1.6 Publishing Translations

for publishing package translations / general translations for application your can run

    php artisan vendor:publish --tag translation

or (to force overwrite existing files, and only from this package)

    php artisan vendor:publish --tag="translation" --provider="\\Subscribo\\ApiClientCommon\\Integration\\Laravel\\ApiClientLocalizationServiceProvider" --force

1.6 Publishing Translated views

for overwriting your application views with translated ones you can run publishing package translations / general translations for application your can run

    php artisan vendor:publish --tag translation

or (to force overwrite existing files, and only from this package)

    php artisan vendor:publish --tag="translated_views" --provider="\\Subscribo\\ApiClientCommon\\Integration\\Laravel\\ApiClientLocalizationServiceProvider" --force

apiclientlocalization's People

Contributors

mstroeck avatar slavo2 avatar

Watchers

 avatar  avatar  avatar

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.