PHP code example of code4recovery / spec
1. Go to this page and download the library: Download code4recovery/spec library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
code4recovery / spec example snippets
$spec::getLanguages();
// this returns:
[
'en' => 'English',
'es' => 'Español',
'fr' => 'Français',
'ja' => '日本語',
'nl' => 'Nederlands',
'pt' => 'Português',
'sk' => 'Slovenčina',
'sv' => 'Svenska',
'th' => 'ไทย',
];
$spec::getAllTypes();
// this returns (truncated):
{
"11": {
"en": "11th Step Meditation",
"es": "Meditación del Paso 11",
"fr": "Méditation sur la 11e Étape",
"ja": "ステップ11 黙想",
"nl": "Stap 11 meditatie",
"pt": "Meditação do 11º Passo",
"sk": "Meditácia 11. kroku",
"sv": "11th Stegs Meditation",
"th": "สมาธิขั้นที่ 11"
},
"12x12": {
"en": "12 Steps & 12 Traditions",
"es": "12 Pasos y 12 Tradiciones",
"fr": "12 Étapes et 12 Traditions",
"ja": "12のステップと12の伝統",
"nl": "12 Stappen en 12 Tradities",
"pt": "12 Passos e 12 Tradições",
"sk": "12 Krokov & 12 Tradícií",
"sv": "12 Steg & 12 Traditioner",
"th": "12 ขั้นตอนและ 12 ธรรมเนียม"
},
...
};
$spec::getTypesByLanguage('en');
// returns (truncated):
[
"11" => "11th Step Meditation"
"12x12" => "12 Steps & 12 Traditions"
"A" => "Secular"
"ABSI" => "As Bill Sees It"
...
];