Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skoro/stardict
PHP interface to StarDict dictionaries
https://github.com/skoro/stardict
php-interface stardict
Last synced: 2 months ago
JSON representation
PHP interface to StarDict dictionaries
- Host: GitHub
- URL: https://github.com/skoro/stardict
- Owner: skoro
- Created: 2016-01-19T12:35:01.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T15:09:38.000Z (7 months ago)
- Last Synced: 2024-09-18T08:13:53.034Z (4 months ago)
- Topics: php-interface, stardict
- Language: PHP
- Homepage:
- Size: 197 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# StarDict
Provides PHP interface to StarDict dictionaries.Install via composer:
```
composer require skoro/stardict
```## Usage
```php
use StarDict\StarDict;require dirname(__FILE__) . '/vendor/autoload.php';
$dict = StarDict::createFromFiles('dict.ifo', 'dict.idx', 'dict.dict.dz');
echo $dict->getDict()->getBookname(); // show dict name.
foreach ($dict->get('word') as $result) {
echo $result->getValue();
}
```## Caveats
- Only 2.4.2 StarDict version is supported.
- Option `sametypesequence` is required and cannot be empty.