Skip to content

Commit

Permalink
📝 update readme with new name
Browse files Browse the repository at this point in the history
  • Loading branch information
mantoufan committed Oct 5, 2024
1 parent cd2e6b8 commit ce3fc0a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yzhanTranslator
# YZhanTranslator

yzhanTranslator is a PHP library for translating content using OpenAI's language models with caching capabilities. It supports translating strings and JSON objects, as well as language detection.
YZhanTranslator is a PHP library for translating content using OpenAI's language models with caching capabilities. It supports translating strings and JSON objects, as well as language detection.

## Features

Expand All @@ -18,20 +18,20 @@ yzhanTranslator is a PHP library for translating content using OpenAI's language

## Installation

Install yzhanTranslator using Composer:
Install YZhanTranslator using Composer:

```bash
composer require mantoufan/yzhanTranslator
composer require mantoufan/yzhantranslator
```

## Usage

### Basic Translation

```php
use yzhanTranslator\yzhanTranslator;
use YZhanTranslator\YZhanTranslator;

$translator = new yzhanTranslator([
$translator = new YZhanTranslator([
'client' => 'OpenAI',
'apiKey' => 'your_openai_api_key',
'apiUrl' => 'https://api.openai.com',
Expand Down Expand Up @@ -81,7 +81,7 @@ print_r($result); // ['k' => '你好', 'k2' => 'Hello']

## Configuration

yzhanTranslator uses environment variables for configuration. Create a `.env` file in your project root with the following contents:
YZhanTranslator uses environment variables for configuration. Create a `.env` file in your project root with the following contents:

```
OPENAI_APIKEY=your_openai_api_key
Expand Down

0 comments on commit ce3fc0a

Please sign in to comment.