{"id":20523113,"url":"https://github.com/itstructure/yii2-template-multilanguage","last_synced_at":"2025-03-06T00:44:39.807Z","repository":{"id":37514924,"uuid":"184888463","full_name":"itstructure/yii2-template-multilanguage","owner":"itstructure","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-19T21:24:49.000Z","size":4601,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T10:50:20.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itstructure.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-04T11:53:26.000Z","updated_at":"2023-02-02T01:33:50.000Z","dependencies_parsed_at":"2025-01-16T10:54:38.204Z","dependency_job_id":null,"html_url":"https://github.com/itstructure/yii2-template-multilanguage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-template-multilanguage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-template-multilanguage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-template-multilanguage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-template-multilanguage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itstructure","download_url":"https://codeload.github.com/itstructure/yii2-template-multilanguage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242128319,"owners_count":20076177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T22:38:02.416Z","updated_at":"2025-03-06T00:44:39.765Z","avatar_url":"https://github.com/itstructure.png","language":"PHP","readme":"Yii2 template multilanguage install documentation\n==============\n\n[![Build Status](https://scrutinizer-ci.com/g/itstructure/yii2-template-multilanguage/badges/build.png?b=master)](https://scrutinizer-ci.com/g/itstructure/yii2-template-multilanguage/build-status/master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/itstructure/yii2-template-multilanguage/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/itstructure/yii2-template-multilanguage/?branch=master)\n\n1 Introduction\n----------------------------\n\nYii2 project template with multilanguage mode, based on [Yii2 basic framework](https://github.com/yiisoft/yii2-app-basic).\n\nProject is available to install at [Git Hub repository](https://github.com/itstructure/yii2-template-multilanguage).\n\nThis template includes:\n\n- Admin panel, based on [AdminLTE](https://github.com/almasaeed2010/AdminLTE)\n\n- Ability to content manage with some number of languages.\n\n- Number of entities, which are managed by admin panel:\n    - Languages\n    - Site settings (Initial role and status after registration, e.t.c.)\n    - Users\n    - RBAC (Set roles and permissions for users)\n    - Positions\n    - Pages\n        - Products (child products for pages)\n    - Feedback\n    - About (about company page)\n        - Technologies (child)\n        - Qualities (child)\n    - Contacts\n        - Social (child)\n    - Home page\n    - Site map\n    \nThis template helps you to easy start your Yii2 project. And then you can change it as you wish.\n\n2 Requirements\n----------------------------\n\n- php \u003e= 7.1\n- composer\n- MySql \u003e= 5.5\n\n3 Installation\n----------------------------\n\n1. Clone project.\n\n    `SSH SOURCE: git@github.com:itstructure/yii2-template-multilanguage.git`\n    \n    `HTTPS SOURCE: https://github.com/itstructure/yii2-template-multilanguage.git`\n    \n2. Install dependencies by running from the project root `composer install`\n\n3. Copy file `config/base-url_example.php` to `config/base-url.php`. In file `config/base-url.php` set a project host:\n\n    ```php\n    return 'http://example-host.com';\n    ```\n\n4. You can set the environment options. For that, copy file `config/environment_example.php` to `config/environment.php`. In file `config/environment.php` set the next:\n\n    ```php\n    define('YII_DEBUG', true);\n    define('YII_ENV', 'dev');\n    ```\n    \n    or\n    \n    ```php\n    define('YII_DEBUG', false);\n    define('YII_ENV', 'test');\n    ```\n\n    If to not set this options, then by default: `YII_DEBUG` is **false**, `YII_ENV` is **prod**.\n\n5. Create new data base.\n\n6. Copy file `config/db_example.php` to `config/db.php`. In file `config/db.php` set settings according with the access to MySql server.\n\n    Example:\n    \n    ```php\n    return [\n        'class' =\u003e 'yii\\db\\Connection',\n        'dsn' =\u003e 'mysql:host=localhost;dbname=yourdbname',\n        'username' =\u003e 'root',\n        'password' =\u003e 'passwordvalue',\n        'charset' =\u003e 'utf8',\n    ];\n    ```\n\n7. Run the RBAC migration:\n\n    `yii migrate --migrationPath=@yii/rbac/migrations`\n    \n8. Run the command to build initial rbac entities:\n\n    `yii build-rbac`\n    \n    Roles and permissions will be created with the following structure:\n    \n        |--------------------|-----------------------------|\n        |                    |            Roles            |\n        |                    |-----------------------------|\n        | Permissions        |  admin  | manager |  user   |\n        |--------------------|---------|---------|---------|\n        | CREATE             |    X    |         |         |\n        | UPDATE             |    X    |         |         |\n        | DELETE             |    X    |         |         |\n        | SET_ROLES          |    X    |         |         |\n        | VIEW_BACKSIDE      |    X    |    X    |         |\n        | VIEW_FRONTSIDE     |    X    |    X    |    X    |\n        |--------------------|---------|---------|---------|\n    \n9. Run multilanguage migration:\n\n    `yii migrate --migrationPath=@admin/migrations/multilanguage`\n    \n10. Run MFU module migration:\n\n    `yii migrate --migrationPath=@mfuploader/migrations`\n    \n11. Run the application migration:\n\n    `yii migrate`\n    \n12. If you are going to use google captcha, copy file `config/captcha_example.php` to `config/captcha.php`. In file `config/captcha.php` it is necessary to set captcha params:\n\n    ```php\n    return [\n        'site_key' =\u003e 'your-google-site-key',\n        'secret_key' =\u003e 'your-google-secret-key',\n    ];\n    ```\n    \n    And uncomment `captcha` option in `config/params.php` config file.\n    \n13. If you are going to load some files to Amazon S3 remote storage by [MFUploader module](https://github.com/itstructure/yii2-multi-format-uploader), it is necessary to set AWS access params in new `config/aws-credentials.php` config file.\n    \n    Copy file `config/aws-credentials_example.php` to `config/aws-credentials.php` and set:\n        \n    ```php\n    return [\n        'key' =\u003e 'your-aws-s3-key',\n        'secret' =\u003e 'your-aws-s3-secret',\n    ];\n    ```\n    \n    And uncomment `s3-upload-component` option of the `mfuploader` module option in `config/admin/admin.php` config file.\n    \n    Comment or delete `local-upload-component` option.\n    \n    Then set `'defaultStorageType' =\u003e MFUModule::STORAGE_TYPE_S3`","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstructure%2Fyii2-template-multilanguage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitstructure%2Fyii2-template-multilanguage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstructure%2Fyii2-template-multilanguage/lists"}