Skip to content

Commit aaebe8e

Browse files
authored
Update README.md
1 parent ffe6390 commit aaebe8e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# php-google-translator
2-
Php wrapper for google translator plugin
2+
Php wrapper for google javascript translator website plugin. It will create a dropdown option for languages.
33

44
![alt text](https://github.com/peterujah/php-google-translator/blob/df2497403282a8d3a9cd629649aa361d3100a503/assets/en.jpg)
55
![alt text](https://github.com/peterujah/php-google-translator/blob/df2497403282a8d3a9cd629649aa361d3100a503/assets/cn.jpg)
@@ -33,6 +33,20 @@ Set the fag icon type, `PNG` or `SVG` to use icons download country flag icon an
3333
$translate->setIconType(GTranslator::PNG || GTranslator::SVG);
3434
$translate->setIconPath("https://foo.com/assets/flags/");
3535
```
36+
Add additional langues
37+
38+
```php
39+
$translate->addLanguage("en", "English")->addLanguage("ig", "Igbo");
40+
```
41+
42+
Load languages
43+
44+
```php
45+
$translate->setLanguages([
46+
"en" => "English",
47+
"ig" => "Igbo"
48+
])
49+
``
3650

3751
```php
3852
<?php

0 commit comments

Comments
 (0)