Skip to content

Commit 4d3d099

Browse files
committed
Update documentation for first official release
1 parent 8c7edf9 commit 4d3d099

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-language-recognizer` will be documented in this file.
44

5-
## 1.0.0 - 202X-XX-XX
5+
## 0.1.0 - 2023-07-01
6+
7+
- first official release
8+
- Add [DeepL](https://www.deepl.com/) driver
9+
- Add local driver based on [Franc](https://github.com/wooorm/franc)
10+
- Support Laravel 9 and 10 (requires PHP 8.0 or above)
611

7-
- initial release

README.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
# Laravel Language Recognizer
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/oneofftech/laravel-language-recognizer.svg?style=flat-square)](https://packagist.org/packages/oneofftech/laravel-language-recognizer)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/oneofftech/laravel-language-recognizer/run-tests?label=tests)](https://github.com/oneofftech/laravel-language-recognizer/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/oneofftech/laravel-language-recognizer/Check%20&%20fix%20styling?label=code%20style)](https://github.com/oneofftech/laravel-language-recognizer/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
4+
[![Unit tests badge](https://github.com/OneOffTech/laravel-language-recognizer/actions/workflows/run-tests.yml/badge.svg)](https://github.com/OneOffTech/laravel-language-recognizer/actions/workflows/run-tests.yml)
65
[![Total Downloads](https://img.shields.io/packagist/dt/oneofftech/laravel-language-recognizer.svg?style=flat-square)](https://packagist.org/packages/oneofftech/laravel-language-recognizer)
76

87

98
Recognize the language in which a text is written.
109

10+
Language Recognizer for Laravel is a package providing various drivers to recognize the language of a
11+
given text.
12+
13+
Currently two drivers are offered:
14+
15+
- A local binary application
16+
- A [DeepL](https://www.deepl.com/) based one
17+
1118
## Installation
1219

1320
You can install the package via composer:
@@ -16,6 +23,21 @@ You can install the package via composer:
1623
composer require oneofftech/laravel-language-recognizer
1724
```
1825

26+
You can publish the config file with:
27+
28+
```bash
29+
php artisan vendor:publish --provider="Oneofftech\LaravelLanguageRecognizer\LaravelLanguageRecognizerServiceProvider" --tag="laravel-language-recognizer-config"
30+
```
31+
32+
> If you change the path to the Franc binary, as configured in the local driver, ensure that the file is moved or present in that location. You can run `php artisan language-recognizer:install-local-driver` to download the binary in the configured location
33+
34+
The configuration file allows to configure the driver parameter for
35+
performing the language recognition.
36+
37+
### Driver pre-requisites
38+
39+
**Local Driver**
40+
1941
The language recognition, when performed using the local driver,
2042
is done using the [Franc](https://github.com/wooorm/franc) library, in particular
2143
a [packaged version](https://github.com/avvertix/franc-bin) in form on an executable.
@@ -26,16 +48,13 @@ To download the executable version run:
2648
php artisan language-recognizer:install-local-driver
2749
```
2850

29-
You can publish the config file with:
51+
**DeepL Driver**
3052

31-
```bash
32-
php artisan vendor:publish --provider="Oneofftech\LaravelLanguageRecognizer\LaravelLanguageRecognizerServiceProvider" --tag="laravel-language-recognizer-config"
33-
```
53+
The [DeepL](https://www.deepl.com/) driver requires a valid API key.
54+
You can obtain a free key on [deepl.com](https://www.deepl.com/pro#developer).
3455

35-
> If you change the path to the Franc binary, as configured in the local driver, ensure that the file is moved or present in that location. You can run `php artisan language-recognizer:install-local-driver` to download the binary in the configured location
56+
After obtaining the key specifiy it via the `LANGUAGE_RECOGNIZER_DEEPL_KEY` environment variable.
3657

37-
This configuration file allows to specifiy the drivers for performing the language
38-
recognition and their eventual options.
3958

4059
## Usage
4160

@@ -68,7 +87,7 @@ Please review [our security policy](../../security/policy) on how to report secu
6887
## Credits
6988

7089
- [Alessio](https://github.com/avvertix)
71-
- [All Contributors](../../contributors)
90+
- [All Contributors](https://github.com/OneOffTech/laravel-language-recognizer/graphs/contributors)
7291

7392
## License
7493

0 commit comments

Comments
 (0)