Code Monkey home page Code Monkey logo

lingo's Introduction

Lingo

is a file based translation manager, which unlike other Lang managers dont need a database connection to handle the translation.

Installation

  • composer require ctf0/lingo

  • (Laravel < 5.5) add the service provider

'providers' => [
    ctf0\Lingo\LingoServiceProvider::class,
]
  • install dependencies
yarn add vue vuemit vue-notif
# or
npm install vue vuemit vue-notif --save
  • publish the package assets with

php artisan vendor:publish --provider="ctf0\Lingo\LingoServiceProvider"

  • after installation, package will auto-add
    • package routes to routes/web.php
    • package assets compiling to webpack.mix.js
    • MIX_LINGO_FRAMEWORK=bulma to .env

Features

  • add/remove "vendor/locale/file/item"
  • show guiding steps while adding new vendor for better UX.
  • validate for "vendor/locale/file" existence on the fly
  • use localeStorage to remember opened "tab/vendor/files"
  • show/hide different elements to avoid noise & keep the user focused

Usage

  • for styling we use bulma

Or Use another Framework

  • duplicate resources/views/vendor/Lingo/lingo-bulma and rename it to the framework you want ex.lingo-bootstrap
  • duplicate assets/vendor/Lingo/sass/bulma.scss and rename it to the framework you want ex.bootstrap.scss
  • edit assets/vendor/Lingo/js/shared/content.vue & assets/vendor/Lingo/js/Tabs/vendor.vue
  • set MIX_LINGO_FRAMEWORK to the framework name ex.MIX_LINGO_FRAMEWORK=bootstrap
  • start editing the new files.
  • add this one liner to your main js file and run npm run watch to compile your js/css files.
    • if you are having issues with npm run production, Check
require('./../vendor/Lingo/js/lingo')

new Vue({
    el: '#app'
})
  • now visit localhost:8000/lingo

Notes

  • we use Laravel Langman for scanning for missing translation keys, but if you have better alternative plz open a ticket.

  • Atm the package doesn't support multi level/nested arrays so any PRs / ideas are welcomed.

    however, if a file with nested arrays is detected a warning will show up so you don't accidentally save the file as we overwrite files on save.

lingo's People

Contributors

ctf0 avatar

Watchers

James Cloos 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.