You are not logged in.
Pages: 1
LAST VERSION IN PLUCK MODULES PAGE http://pluck-cms.org/docs/addons:modules
AND ALSO WITH MORE MODULES http://internetismo.com/en/?file=kop7.php
I have my websites in a linux server. It's very easy.
The unique folder you need for every language is the settings folder (data/settings).
1. Create a main install directory of pluck, the reference. Install pluck here. For example http://internetismo.com/en
2. Create other directory for the second language. For example http://internetismo.com/es. Don't install pluck here. Copy the entire folder http://internetismo.com/en/data/settings in the directory http://internetismo.com/es/data/
3. Change the var $langpref of es/data/settings/langpref.php
4. Create symbolic link inside "es" directory for all the others files and folders of the "en" directory, not for settings.
et voilà, repeat the points 2, 3 and 4 for every language you want.
You can create symbolic link by php:
function _symlink( $target, $link ) {
if ($_SERVER['WINDIR'] || $_SERVER['windir']) {
exec('junction "' . $link . '" "' . $target . '"');
} else {
symlink($target,$link);
}
}
function _unlink($link ) {
if ($_SERVER['WINDIR'] || $_SERVER['windir']) {
exec('junction -d "' . $link . '"');
} else {
unlink($link);
}
}
Last edited by westial (04-01-2010 22:21:44)
Offline
This is exactly what i was looking for, i dont really understand how this works, where to implement the codes for the links to each language sites. I would think that some piece of code has to be in the theme file.
Can anybody explain in beginner language if you have the time and feel like it ![]()
Thanks in advance.
Offline
hi Hallon,
I'm developping new module following these instructions. If you need it fastly you can download the 0.5 version here http://internetismo.com/testing/multilang.tar.gz
This module creates new directory "multilang" in the main folder. And puts the language you want. It makes a copy of the settings folder and creates all the other files and folders like a symbolic links of the source language (your first installation language).
You will see the multilang folder with the new languages "es, en, fr,..." you can link them manually. I'm optimizing it. I would like the days are 30h, not only 24h...
I have tested on linux server and runs fine. I don't know if it runs on windows but the functions have the windows option too
Offline
wow, cool
gonna try it. Thanks.
I currently put up two flags with a link to the first page in respectivly language, i assume your module takes the visitor to the page that they are on to the other language. Well anyway. Gonna try it right away.
Offline
ei,
the module only creates the other languages from the main language yet. There aren't flags or links to these pages in multilang, you must create a index.html with these links:
multilang/ct/ <-- public contents of catalan language
multilang/se/ <-- public contents of sweeden language
to admin:
multilang/se/admin.php <-- admin contents of sweeden language
It shares the images, themes, modules, etc,... between languages because all languages have the same folders of main language, by symbolic links. The settings folder is the only one is genuine of every language.
In index.html you can put a javascript to redirect automatically to the user explorer's language:
<script type="text/javascript">
<!-- language redit
if (navigator.userAgent.indexOf("Opera")!=-1) (language=navigator.language)
else { if (navigator.appName == "Netscape") (language=navigator.language)
else language=navigator.browserLanguage };
if (language){language=language.substring(0,2)}
else {language="zz"}
if (language=="se") {
window.location="multilang/se";
}
if (language=="ct") {
window.location="multilang/ct";
}
// fi -->
</script>
good pluck
Last edited by westial (10-10-2009 13:37:58)
Offline
Thanks for your information
Really apreciate it.
Good luck to yourself in future development
Looking forward what you are doing in the next update. ![]()
Offline
hi Hallon,
I'm developping new module following these instructions. If you need it fastly you can download the 0.5 version here http://internetismo.com/testing/multilang.tar.gzThis module creates new directory "multilang" in the main folder. And puts the language you want. It makes a copy of the settings folder and creates all the other files and folders like a symbolic links of the source language (your first installation language).
You will see the multilang folder with the new languages "es, en, fr,..." you can link them manually. I'm optimizing it. I would like the days are 30h, not only 24h...
I have tested on linux server and runs fine. I don't know if it runs on windows but the functions have the windows option too
Hello Westial
it works fine on a windows server
Great job
about the links to the different language's confuses me you are writing abot a html doc but i havent any ?
i have index.php
can you explane what i have to do
Thnx in front
Offline
hello jedadesign,
thank you for windows testing. I must finish this module with the index.html creation automatically, doesn't exists now, you must create manually. A index.html file, in the same main folder than admin.php, install.php,...
In this index.html you must link the different languages and/or implement the javascript language selector I have pasted before. Different languages linked to multilang/se or multilang/ct or multilang/[lang],...
And also you need to put the links to different languages on theme.php, this is other thing I must writte to finish the module
Offline
I have finished one acceptable version of this module. I have added the downloadable module in http://pluck-cms.org/docs/addons:modules
The module doesn't create an index.html, but you can include the module in all pages to select the language preferred for the user.
I have tested, but I have not any page with this module. Please if someone installs this module and finds an error, please write here and I will repair it.
I have read what the pluck team are preparing a language solution for new version, if not, I will work in this module to make it optimal.
Last edited by westial (04-01-2010 00:15:23)
Offline
New version 0.6 because 0.5 doesn't allow to create new languages from cloned languages.
This module doesn't create symbolic links in localhost, only in remote servers, linux and windows servers.
Last edited by westial (05-01-2010 23:34:18)
Offline
Thank you elisabethabram,
I'm thinking to optimize it, after, I will send you the release advertising at all of this post
Offline
Pages: 1