-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigSpeedFormat.php
43 lines (30 loc) · 1.32 KB
/
ConfigSpeedFormat.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Macocci7\PhpPhotoGps\PhotoGps;
$filename = 'img/with_gps.jpg';
$pg = new PhotoGps($filename);
echo "[" . $filename . "]--------------------\n";
// Format: default
echo "Current format [eng]: " . $pg->lang('eng')->speedFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->speedFormat() . "\n\n";
// Speed: default format
echo "Speed [eng]: " . $pg->lang('eng')->speedS() . "\n";
echo "Speed [ja]: " . $pg->lang('ja')->speedS() . "\n\n";
// Configure Format: eng
$pg->lang('eng')->speedFormat('{speed:v}({speed:u})');
// Current Format
echo "Current format [eng]: " . $pg->lang('eng')->speedFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->speedFormat() . "\n\n";
// Speed: Current Format
echo "Speed [eng]: " . $pg->lang('eng')->speedS() . "\n";
echo "Speed [ja]: " . $pg->lang('ja')->speedS() . "\n\n";
// Configure Format: ja
$pg->lang('ja')->speedFormat('時速{speed:v}マイル');
// Reset Format: eng
$pg->lang('eng')->resetSpeedFormat();
// Current Format
echo "Current format [eng]: " . $pg->lang('eng')->speedFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->speedFormat() . "\n\n";
// Speed: Current Format
echo "Speed [eng]: " . $pg->lang('eng')->speedS() . "\n";
echo "Speed [ja]: " . $pg->lang('ja')->speedS() . "\n\n";