Skip to content

Instantly share code, notes, and snippets.

@bbrochier
Created February 13, 2017 14:15
Show Gist options
  • Save bbrochier/e80012d587115bd9dec7004c911f223f to your computer and use it in GitHub Desktop.
Save bbrochier/e80012d587115bd9dec7004c911f223f to your computer and use it in GitHub Desktop.
Traduction php
<?php
if (isset($_GET['lang']) && $_GET['lang'] == 'en') {
include 'traductions_en.php';
} else {
include 'traductions_fr.php';
}
?>
<html>
<body>
<?php echo $traduction['contact-us']; ?>
</body>
</html>
<?php
$traduction = [
'contact-us' => 'Contactez us by phone',
];
?>
<?php
$traduction = [
'contact-us' => 'Contactez-nous par téléphone',
];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment