承接 ippey/weglot-integration 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ippey/weglot-integration

Composer 安装命令:

composer require ippey/weglot-integration

包简介

WEGLOT integration

README 文档

README

Weglot integration

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later. And you need Weglot Account.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require Ippey/weglot-integration
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for weglot-integration.

weglot-integration Overview

This plugin provides to switch language easily via Weglot. Weglot translates automatically instead of you.

weglot

Configure

You need to get API Key from Weglot Dashboard, and please save it on setting page. This plugin uses "JavaScript Integration". Please click "Use JavaScript Integration", when you set up a Weglot Project.

How to use

Twig Extension

Automatically translation

UPDATE You don't need to use Twig filter. This plugin adds script tag automatically.

You can see a language switcher lower right. The page will be translated automatically if you switch other language.

Manually translation

Use bellow Twig filter if you want to translate manually.

{{ '攻殻機動隊' | weglot_translate('ja', 'en') }}
Ghost in the Shell.

Service

You can also translate using plugin's service in your PHP Code.

$text = 'Spirited Away';
$from = 'en';
$to = 'ja';
$translated = \ippey\weglotintegration\Weglotintegration::getInstance()->weglotService->translate($text, $from, $to);
echo ($translated); // 千と千尋の神隠し

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固