Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.
/ strata-polyglot Public archive

Works hand in hand with Strata to bring localization of dynamic Wordpress objects.

License

Notifications You must be signed in to change notification settings

strata-mvc/strata-polyglot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polyglot

Configuration

Declare your application locales under ~/config/strata.php. You can specify the url key as well as the locale code. It is important that the locale code follows ISO standards. It must have either two characters (en) or be the complete version containing the country information (en_US).

<?php
$strata = array(
    "routes" => array(),
    "custom-post-types" => array(),

    "i18n" => array(
        "textdomain" => "my_website",
        "default_locale_fallback" => true,
        "locales" => array(
            "en_CA" => array("nativeLabel" => "English", "default" => true),
            "fr_CA" => array("nativeLabel" => "Français", "url" => "francais"),
            "pi" => array("nativeLabel" => "Pirate"),
         )
    )
);

return $strata;
?>