Download the PHP package nobox/lazy-strings without Composer

On this page you can find all versions of the php package nobox/lazy-strings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lazy-strings

Lazy Strings

Create localized strings from a Google Docs Spreadsheet.

Build Status

Installation

Add Lazy Strings to your composer.json file.

Usage

Create an instance of LazyStrings with the following settings.

And generate your strings with the generate(); method.

Settings

Each setting key item is described below.

url

Add the Google spreadsheet published url. This should be done with File -> Publish to the web..., replace pubhtml with export?format=csv at the end and use http on the url. Remember that this document must be available to anyone. Use Public on the web on your Sharing settings. If not, Lazy Strings won't be able to parse it.

sheets

Here you'll specify all the sheets in your Google doc (if it's more than one) with their id, each separated by locale. Use an array if using more than one sheet for a locale. Example:

You can take the id from the spreadsheet using the gid variable from your Google doc url. For example, in this spreadsheet: https://docs.google.com/a/nobox.com/spreadsheets/d/1V_cHt5Fe4x9XwVepvlXB39sqKXD3xs_QbM-NppkrE4A/edit#gid=1626663029 the id is 1626663029.

target

Here you must specify a path where to store your translations.

Using these settings it will generate the following translation files in path/to/strings/folder.

backup

Here you must specify a path where to store your translations in JSON format. More like a "backup" of your strings.

Using these settings it will generate the following translation files in path/to/strings/folder.

nested

Specify whether or not you want your translations array to be nested.

If you use the nested setting as true your translations will look like something like this:

And like this with false.

How it works

Lazy Strings uses an id => value convention to access the copy, it generates a lazy.php file inside the specified language locale folder. You can see an example doc here.

id value
title Your page title
tagline Your page tagline
laravel PHP Framework
header.hero.headline Hero headlines
header.hero.subject Main hero subject

Using this example doc (with nested translations) you can access the first row like this:

License

MIT


All versions of lazy-strings with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nobox/lazy-strings contains the following files

Loading the files please wait ....