Last active
August 29, 2015 14:10
-
-
Save hissy/23e496e83613ca82b914 to your computer and use it in GitHub Desktop.
concrete5で、特定のディレクトリだけ英語サイトにする(Internationalizationアドオンを使わない簡易版)(〜5.6.x)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// config/site_post.php | |
defined('C5_EXECUTE') or die("Access Denied."); | |
$req = Request::get(); | |
$reqPath = $req->getRequestPath(); | |
if ( strpos($reqPath, 'en/') !== false ) { | |
Localization::changeLocale('en_US'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// config/site_post_autoload.php | |
defined('C5_EXECUTE') or die("Access Denied."); | |
$req = Request::get(); | |
$reqPath = $req->getRequestPath(); | |
if ( strpos($reqPath, 'en/') !== false && !defined('SITE') ) { | |
define('SITE', 'English Site Name'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment