Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created July 4, 2025 15:07
Show Gist options
  • Save codeforfun-jp/d117000c24707505521e0fe01265d480 to your computer and use it in GitHub Desktop.
Save codeforfun-jp/d117000c24707505521e0fe01265d480 to your computer and use it in GitHub Desktop.
Translation for MAMP 5.x - windows
<?php
if( !function_exists('json_decode') ) {
include_once(dirname(__FILE__)."/JSON.php");
function json_decode($data) {
$json = new Services_JSON();
return( $json->decode($data) );
}
}
// available Languages
// $arr_languages = (array) array('English', 'German', 'Italian', 'Japanese', 'ru', 'Spanish', 'French');
$arr_languages = (array) array('English', 'German', 'Japanese');
$language = (isset($_REQUEST['language'])) ? $_REQUEST['language'] : 'English';
if (!in_array($language, $arr_languages)) {
$language = 'English';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment