2017 © Pedro Peláez
 

silverstripe-module translatable-tlds

SilverStripe module providing TLD-based locale switching using Translatable.

image

level51/translatable-tlds

SilverStripe module providing TLD-based locale switching using Translatable.

  • Tuesday, October 18, 2016
  • by JZubero
  • Repository
  • 2 Watchers
  • 0 Stars
  • 312 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 3 Versions
  • 27 % Grown

The README.md

Translatable Top-Level-Domains for SilverStripe

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., (*1)

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., (*2)

Be sure to run dev/build?flush=all after you have added the module., (*3)

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:, (*4)

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., (*5)

Maintainers

The Versions

18/10 2016

dev-master

9999999-dev

SilverStripe module providing TLD-based locale switching using Translatable.

  Sources   Download

MIT

The Requires

 

by Julian Scheuchenzuber

18/10 2016

dev-develop

dev-develop

SilverStripe module providing TLD-based locale switching using Translatable.

  Sources   Download

MIT

The Requires

 

by Julian Scheuchenzuber

18/10 2016

0.1.0

0.1.0.0

SilverStripe module providing TLD-based locale switching using Translatable.

  Sources   Download

MIT

The Requires

 

by Julian Scheuchenzuber