Hi,
I am working on a website (set-up in Wordpress) in 5 languages, each language is in one folder: domain.com/en/, domain.com/es/ etc.
Now I want for example in the sidebar and in the header to appear content depending on the language (=folder).
For example: If I am on any page inside the folder ../en/, I want to show the site menu only with the sites in english, in the sidebar I want to show the links and Ads in english etc.
My php knowledge is pretty limited, so I would be happy if somebody could help me with some advice.
Thanks a lot!
5 1495
if your language specific folder contains all necessary files, you can use relative path names and you shouldn’t have further problems to include headers, footers, sidebars, etc.
Hi Dormilich, thanks for your reply.
I am using Wordpress as a CMS for this website, so there ist no "real" folder structure, all the content is in the data base and the layout uses the same templates for all languages.
So I have one sidebar file and one header file for the whole website. Within those files I need to put different content, depending on the language. How do I detect the language then?
Some kind of function which checks if the current page URL contains the folder /en/, /es/, etc.
"if the url contains /en/, show me sidebar content for /en/..."
I hope you understand my idea?! ;-)
Thanks for your help!
do you know, whether the URL is passed through mod_rewrite? (then you would probably have a variable with that value) maybe this is mentioned somewhere in the wordpress documentation.
yes, the site is using mod_rewrite to rewrite the urls. how can i get a variable out of that?
that must be mentioned in the documentation. otherwise, if you have access to the .htaccess file (which I doubt), you could look it up there.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: CJM |
last post by:
I have an ASP page that lists files and folders in a directory. I'm using a
cookie to record the last time this page was visited, and I intend to show
links that are created/modified from that date...
|
by: Sebastian Kerekes |
last post by:
Greetings,
I'm developing an application that supports multiple languages. In my
XSL I use variables to place the text where it belongs to. At the top of
the document I include those variables -...
|
by: Andy |
last post by:
Hi all,
I'd like to have an App.config file for development, then when I build
the deployment package (using one of the VS.net projects), i'd like to
specify a different .config file to install...
|
by: |
last post by:
I have just about finished my project and need to change the name of the
..exe file created by the Windows Installer to the real name.
I was developing naming the solution and project MyProject,...
|
by: Paul Aspinall |
last post by:
Hi
I am writing a system which will form part of a warehouse management system,
running over a corporate intranet.
The system will print labels to TCP/IP Zebra printers. I want to direct the...
|
by: empiresolutions |
last post by:
I'm trying to build my first PHP Class. After days of tweaking, im lost. I am used to working with functions and arrays, but wrapping them in classes is confusing me.
The following code is to...
|
by: Rahul83 |
last post by:
Hi.. I have written a perl script for displaying the difference between two directory structures.(including the diffferences in the files)
I have to generate the output in a log file.
...
|
by: Andy B |
last post by:
I am using web deployment projects combined with web application projects in
Visual Studio 2005. I have some projects in the solution called Main and
InHim. I noticed some wierd compiled output in...
|
by: Jon F |
last post by:
Hi everybody,
I have a plain good ol' HTML website that currently hosts several localized
versions of pages. That is, depending on the address/domain that users
enter into their browser, the...
|
by: jay123 |
last post by:
hi all,
what i am trying to do is i have three folders
1) sentto
2) error
3) sent
i am using web services in which we give the name of XML file ( which is in sentto folder. when the name...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |