level51/translatable-tlds 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

level51/translatable-tlds

Composer 安装命令:

composer require level51/translatable-tlds

包简介

SilverStripe module providing TLD-based locale switching using Translatable.

README 文档

README

This modules enables having duplicate URLSegments for different TLDs on one host, e.g. lvl51.de/about and lvl51.com/about. Since this is intended to be used alongside the Translatable module there will be entries in the SiteTree table for each of pages/URLSegments.

Dependencies

  • SilverStripe Framework ~3.1
  • SilverStripe CMS ~3.1
  • Translatable ~2.1

Installation

composer require level51/translatable-tlds

If you don't like composer you can just download and unpack it to the root of your SilverStripe project.

Be sure to run dev/build?flush=all after you have added the module.

Features

  • Locale-sensitive delivery of SiteTree records.
  • Helper methods for working with TLDs:
// Fetches the current TLD and looks for a rule in the config
$locale = TranslatableTLDs::lookup_tld_rule();

// Apply the rule (if not null)
if($locale)
    Translatable::set_current_locale($locale);

Configuration

You can add rules via Config API:

TranslatableTLDs:
  part: 'tld'
  rules:
    'com': 'en_US'
    'de': 'de_DE'
    'net': 'de_AT'

If part is set to 'subdomain', then the module will switch to subdomain matching.

Maintainers

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固