Patch: Choose language upon installation
Permalink
Hi!
Screenshot:http://image-upload.de/image/Rw7Fz8/c991b150bf.png...
What does it do?:
It scans your languages/ dir and lists installed languages in a dropdown during installation.
I don't know if you can read thishttp://www.concrete5.org/community/forums/customizing_c5/patch-choo... , because it was in an area where you usually don't have access unless you're in the beta team. That's why I will repost it here. Maybe it's accessible. Anyway here's my repost then :)
This basically gives you a dropdown of the installed languages upon a c5 install and set the chosen language as active language in your site.php
controllers/install.php line ~987:
single_pages/install.php :
Here is an old example for the single_pages/install.php so you know where to put the above code athttp://pastebin.com/dtdQcN7r
You can download either manually from sf.net or all language packs at once form herehttp://myfreefilehosting.com/f/9856945abe_1.07MB... or herehttp://mygengo.com/string/p/concrete5-1...
you need a mygengo account, ask here if you want to help translating and Mnkras will give you edit-accesshttp://www.concrete5.org/community/forums/internationalization/orga...
Screenshot:http://image-upload.de/image/Rw7Fz8/c991b150bf.png...
What does it do?:
It scans your languages/ dir and lists installed languages in a dropdown during installation.
I don't know if you can read thishttp://www.concrete5.org/community/forums/customizing_c5/patch-choo... , because it was in an area where you usually don't have access unless you're in the beta team. That's why I will repost it here. Maybe it's accessible. Anyway here's my repost then :)
This basically gives you a dropdown of the installed languages upon a c5 install and set the chosen language as active language in your site.php
controllers/install.php line ~987:
$configuration .= "define('LOCALE', '" . addslashes($_POST['LOCALE']) . "');\n";
single_pages/install.php :
<?php $folder = "./".DIRNAME_LANGUAGES; if (is_dir($folder)){ $contents = scandir($folder); $bad = array(".", "..", ".DS_Store", "_notes", "thumbs.db", "Thumbs.db"); $files = array_diff($contents, $bad); array_push($files, 'en_US'); } ?> <label for="LOCALE"><?php echo t('Language')?></label><br/> <?php echo '<select name="LOCALE">'; foreach($files as $language) { if($language == 'da_DK') $languageName = 'Dansk'; if($language == 'de_DE') $languageName = 'Deutsch';
Viewing 15 lines of 28 lines. View entire code block.
Here is an old example for the single_pages/install.php so you know where to put the above code athttp://pastebin.com/dtdQcN7r
You can download either manually from sf.net or all language packs at once form herehttp://myfreefilehosting.com/f/9856945abe_1.07MB... or herehttp://mygengo.com/string/p/concrete5-1...
you need a mygengo account, ask here if you want to help translating and Mnkras will give you edit-accesshttp://www.concrete5.org/community/forums/internationalization/orga...