Download the PHP
package nyrados/translator without Composer
On this page you can find all versions of the php package
nyrados/translator. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor nyrados Package translator Short Description Translation Api to localize webpages License
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.
In this example we will create an instance of Nyrados\Translator\TranslatorApi and set example language preferences. The TranslatorApi will look for translations in these order, including the parent language (en-en is the parent language of en-us).
In this context it will first look for austrian german, then for regular german, then for american english and finally for british english.
A provider is an instance of Nyrados\Translator\Provider\ProviderInterface it provides translations for a language strings and a given language.
Translating single Translation
Usage:
Translating multiple translations
Some times it is recommended to leave a specific area of a page in one language even if a translation is possible (e.g. formulars, navbar, footer).
In this example a german translation for article_header is aviable, but its not used to stay on the same language.
Example:
If you pass an array to translate() it will return an instance of Nyrados\Translator\Translation\TranslationSection which is an Iterator of callables that you can call with a specific context.
Usage:
It is easier to use the following recommended methods as a shortcut which will return the current and calls next().
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 nyrados/translator contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.