i have site i want to translate it other languages, run the site with separate comments and forums.
I was thinking to make swedish and polish sites first, If user gets invite he registers in .sw, he gets account in swedish site and in international (.com). but if he is banned/warned in one, he is banned in all other too.
staff in international site can manage(edit,delete) all his files, in all sites, .sw site can manage only their own files.
if user uploaded his files in .sw site, it is uploaded to .sw and international wtih [hu] in front. for it... If files is uploaded into international site, it is uploaded only there, nowhere else.
For international (.com) site each user can choose in his profile if he wants to see only international site files or all, from all sites.
Each site has it's own: Forums, comments, news, polls and blogs.
how can i do that put keeping the functionality the same for the other sites, in other words if i changed the php code in site effect the others ?
and use one DB for the sites or use for every site it's own DB ?
10 1525
So have you re-written everything for each site? Does each site have different databases? If not, do you record which site a user is part of? Could you?
So have you re-written everything for each site?
I'm only making the structure for the whole sites, and i need good structure for them,for the forums it's good idea for every site to have there own DB put for the site it self i need only the translation only that will be changed put the functionality the same for every domain.
Does each site have different databases?
i plan to register for each site to have there domain name.
Atli 5,058
Expert 4TB
Hi.
You could have all domains point to the same server and serve content based on the URL the client actually requested.
Like, if you had example.com, example.pl and example.se, all pointing to the same server, this would print a welcome message based on the URL used to connect: - <?php
-
switch($_SERVER['HTTP_HOST'])
-
{
-
case "example.pl":
-
echo "Some Polish welcome phrase.";
-
break;
-
case "example.se":
-
echo "Some Swedish weclome phrase.";
-
break;
-
default:
-
echo "Default weclome, for the .com domain.";
-
}
-
?>
Using this technique, you could translate the entire page, show different content (forums, blogs, etc...), and even use different databases.
put this technique it need to have the same PHP files on every domain, and that will be hard to update if i found bug in my code, this technique will force me to upload the whole code again on every domain,what i need is to upload the php files only in .com and other domains have only the index page that will use the code that you have presented Atli and read the code from the .com.
example for "http://example.sw/index.php" : - <?php
-
switch($_SERVER['HTTP_HOST'])
-
{
-
case "example.sw":
-
require('http://example.com/code/php/sw');
-
break;
-
case "example.se":
-
require('http://example.com/code/php/se');
-
break;
-
default:
-
require('http://example.com/code/php/');
-
}
-
?>
Atli 5,058
Expert 4TB
You can host multiple domain names from the same server and have it serve the same files for both.
For example, you could have both example.com and example.net point to the same server, so if I were to request either of these:
- http://example.com/index.html
- http://example.net/index.html
They would both load the same file, located at (for example):
- http://208.77.188.166/index.html
This is what the technique I mentioned above was aimed at.
That would obviously not fit if you intended to host each domain name on a separate server.
How about the language conversion;
how do we get the language converson for instance as per previous statements
example.pl polish
example.sw swedish
is their a module for php to out put the data stored in utf8_unicode_ci to the requested domain name?
if so how?
Atli 5,058
Expert 4TB @wizardry
I don't get the question.
In that scenario, both domains point to the same file, which can be a .php file.
PHP can determine which domain was actually requested, as demonstrated by the example in my first post.
Using that, you can have PHP act differently based on the requested domain.
You could even have it load different databases, include different PHP files, use different output formats or different character sets.
If the user requested the Polish domain, you would have it speak Polish. If it requested the Swedish domain, have it speak Swedish.
hello -
i understand tht it's pointing to the index and then the index decides which domain its going to on ethnicity.
what i would like to know is there a language pack or something to convert your english already designed .php page, to say sweedish language in php?
the way i designed my db is to handle multiple languages. i just cant find a way to convert the existing model over to the new language.
thanks in advance for your help.
Have a look at the gettext() function. You won't be able to convert everything perfectly, and you'll have to rewrite your code a little bit ... or a lot.
PS. sorry for butting in :P
no problem i'm looking into utf8 now for php encoding to new language. i will look into the gettext().
Sign in to post your reply or Sign up for a free account.
Similar topics
by: d.schulz81 |
last post by:
Hi all,
We have about 10 different domains that are linked very closely and we
want to identify and keep track of every single user that surfs our
websites by the use of sessions.
The problem...
|
by: |
last post by:
I think I may have a problem with the user of cookies in my centralized
logon and registration system that I hoped could be consumed by all the
sub-domains on my remote host IP.
I built the...
|
by: Silver Arrow |
last post by:
Iframe ReturnValue returns undefined if domains are not the same
I am using a modal window and an iFrame to try and pull a return value
back.
IMPORTANT : I am doing this across domains.
Main...
|
by: onetitfemme |
last post by:
Domain are very cheap now adays.
What would be the pros and cons of using different hosts served from
the same server, say:
www.blogyourbrainoff.com
and
www.yourbusiness.com
|
by: Paul Fi |
last post by:
I have some confusions about the two, is it possible to create threads
inside a particular domain and have other threads created in another
domain or do we create threads that will manipulate app...
|
by: Marc Eggenberger |
last post by:
Hi there.
I have the following environment:
Active Directory running on Windows 2000. There is a root domain called
ad.sys and within this root domain there are the following subdomains:
...
|
by: Lance Barger |
last post by:
I have been developing several web applications in VB.NET. I have
started to notice that when I run one of the applications, all the
assemblies for that application get loaded PLUS all the...
|
by: Ludvig |
last post by:
I have various domains using the same application/assembly
They differ in contents and design, based on a "site id", and get its
information from an SQL server.
Now I have to deploy the...
|
by: Doug |
last post by:
An ASP.NET session cookie set on "www.mydomain.com" can not be accessed on
"search.mydomain.com"; hence, a new session and cookie are being created on
every sub-domain.
This is occuring because...
|
by: BD |
last post by:
Hi, all.
I need to enforce a one-to-many relationship on 2 tables, with a join
table.
Say the join table contains account information. It has cust_no and
acct_no. Both cust_no and acct_no are...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |