What is the best way to embed a multilanguage option on a wesite

I need to embed an option for viewers to see the site in German or Spanish.
Thanks for any recommendations.

When a website is managed by a CMS (content management system), it becomes possible to manage multiple languages easily.  CMS clients can select the languages they want to use on their websites and  translators can work on the content, all while the web developer sits on the beach drinking margaritas.
Illustrated below is the language selection menu my clients use to manage their language choices. I developed this system because my clients would come to me and say: "OK, now we want to add Russian" and I would then have to make lots of little changes throughout the website to accommodate it.
This method does require relational database features so content for a new language can be added on-the-fly.
In the chart above, "active" means that the language option is ready to be presented on the website. You can see that Russian has been selected but is not active, because translators are still working on the Russian material. Also note that the default language doesn't have to be English.
I use url parameters rather than sessions to pass language selection from page to page so if someone shares a link to a page, it will appear in the expected language, like this:
/topic/de/ufo_lands_in_berlin
To sanitize the url variable, I match the parameter to a lookup:
// WHAT LANGUAGE WILL BE USED
$safe = array("en","vi","zh","de","fr","es","he","nl","ru","ja");
if(in_array($lang_type[1], $safe)) {
$lang_select= $lang_types[1];
} else . . .
The languages for site visitors to choose from are presented like this:
//languages
$sql=$dbh->prepare("SELECT language.language_id, language.language_name FROM language, language_client WHERE language.language_id = language_client.language_id  AND active=1");
try{       
$sql->execute();
}catch(PDOException $e)
{echo $e;}
while($result = $sql->fetch(PDO::FETCH_ASSOC)){
$i++;
$language_id=$result['language_id'];
$language_name=$result['language_name'];
$sel= ($language_id == $language_selected)? "style = 'color:red;text-decoration:none;'" : "style = 'color:#333;text-decoration:none;' ;
$language_block.="<a $sel href ='$domain/$language_id/$page_type2$pm2$pm3$pm4'>$language_name</a> | ";
$language_block = ($i > 1 )? "<p style='text-align:right'>$group_block$language_block</p>" : NULL;
Note that in the above, the language menu is displayed only when  two or more languages are active, so if, for some reason, the client decides they no longer wish to serve those who don't talk English good, the language menu will simply disappear.

Similar Messages

  • What is the Best Way to Embed PDF in HTML?

    In the past, I have included one page PDF's in web pages by placing the PDF in an iframes.  This worked fine until recently.  Starting with Safari 5.1.2 running under OS X 1.6.6, instead of opening within the original page, the PDF has opened in a new tab.  Is there some other way to embed the PDF so this doesn't happen?  Many thanks to all!

    Move it into Flash and insert it as a progressive download.
    http://blog.deconcept.com/2005/03/31/proper-flash-embedding-flashobject-best-practices
    You can see it happen here on my site -
    http://38.144.80.95/n_why-neapco.php
    The central movie is a QT piece imported into Flash and then
    saves as a
    Flash video.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "wadup" <[email protected]> wrote in message
    news:e3qvmq$8aj$[email protected]..
    > dreamer thanks for the response....
    >
    > however i wasnt asking how to do it......
    >
    > i am asking what people think is the best method of
    doing it.........
    >
    > should i embed a .mov file or should i import the move
    into flash and then
    > embed the flash file? should i embed a .wmv file?
    >
    > etc etc....
    >

  • What is the best way to Place/Embed/Link swf files to play in my Muse website?

    I have some older swf files that I created and would love to have them play on my webpage in my Muse website. As soon as I use the place command to put them on a page, Muse crashes when I try and preview that page or publish the site. I'm new to Muse so maybe I should be using an alternate method of bringing those swf files in.
    Also, I would like to use some of the Reallusion programs to create a "talking head" that introduces my website when visitors enter. But Crazy Talk 7 only seems to want to create avi files. What is the best way to get avi's to play in Muse? I have posted this question in the Flash forum also.
    Is there a program in the Creative Suite package that would be better to use to create this talking head or a workflow that will make these videos usable on the pages of Muse?

    Hi Jeanette,
    Please refer to the following forum post : http://forums.adobe.com/message/5122837#5122837
    Cheers!
    Aish

  • What's the best way to back up to the cloud?

    I am going to be traveling in the on a boat in Europe. Access to wifi could be limited and slow. I want to back up my photos and catalog to the cloud as there is potental to lose laptop and external drive. Since I have a 25 mp camera and will be shooting in Raw allot, there will be some big files as each photo could be around 27 gb.
    All of my files will be in the My pictures folder LR set up when I set up my new catalog. I planned to back up these folders to the cloud, then send just the new folders each time I add them to LR during import. Then I was going to have the catalog BK that is created each time you close LR  (just the data only is in this file) sent to the cloud as well.
    Then if my laptop is lost I can copy the back up catalog (just the data file) and the My Pictures file that has all my photos in folders to a new laptop and restore my catalog. I'm told by Adobe help that this won't work as the connection between the photos and the catalog back up will be lost.
    Is this correct? And if so, what's a better method.

    Thanks Jim, and yes I meant 27 mb.  Will be living on a sail boat so there is potential to lose both the laptop and external drive. The cloud was to be my 3rd copy
    Date: Fri, 20 Dec 2013 16:53:44 -0800
    From: [email protected]
    To: [email protected]
    Subject: What's the best way to back up to the cloud?
        Re: What's the best way to back up to the cloud?
        created by JimHess in Photoshop Lightroom - View the full discussion
    You really have images that are 27 GB each? I suspect you meant 27 MB. But, even then, I think cloud backup might be cumbersome. I would suggest carrying a small external hard drive. I have a 1 TB USB 3 drive that is really fast and very small. No external power supply. Plug it in, and copy the files. That's what I would do.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5948781#5948781
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5948781#5948781
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5948781#5948781. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Lightroom at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • What is the best way to add external C++ code to LabView 6.1?

    I have various C++ class-based DLL's written with Visual Studio 6.0 and wish
    to create instances of these C++ classes and call their methods in LabView
    6.1. What is the best way to do this?
    It seems based on the little reading I have done that there are two choices:
    1. Wrap the C++ class as a simple COM control and use LabView's COM based
    VIs to create a COM object and access the methods of various interfaces.
    2. Wrap the C++ class methods as C functions and a "constructor" and
    "destructor" C function to create and destroy an instance of the class. Then
    use LabView's DLL call support.
    Which is best? What direction is LabView going to take that better supports
    the notion of C++ class libraries?
    Thanks,
    Te
    rry

    You could also try using a CIN. This is a tool that LabVIEW provides for interfacing with external code.
    The CINTools libraries of LabVIEW allow you to embed compiled C code into a particular Virtual Instrument (VI) using a CIN.
    In order for LabVIEW to be capable of calling compiled functions of C from a running VI, the code must be loaded and unloaded into memory at the same time as the VI code itself. LabVIEW uses object code in the form of a .lsb file which is generated by the C compiler from the C source code using the ntlvsbm.mak file. This ntlvsbm.mak file is included in the CINtools directory in the LabVIEW folder. You also must create another .mak file which includes parameter definitions for the ntlvsbm.mak file and also includes a call to the LabVIEW .mak file.
    The generic documentation for CINs only explains how to use them to call C compiled code from a LabVIEW VI. It shows several development environments such as Visual C++, but in essence it only allows the user to create .lsb files out of plain C source code ( .c ) through C compilers on those environments.
    The question now is how can I create .lsb files from C++ native source code using a C++ compiler. Furthermore, how can I create a .lsb file from several C++ source code files (.cpp) and make calls to C++ functions from a VI using CINs? The following explains how to do this:
    1) Drop a Code Interface Node (from the Advanced Subpalette of the Functions Palette) into the LabVIEW VI. Make sure to wire the inputs.
    2) Right-click on the CIN and choose "Create.c File...", then in the file dialog box specify a "name.cpp" file name. (very important: use .cpp extension)
    3) Then create a name.mak makefile (text file) and add the following lines :
    name=name_of_cpp_file_without_the_extension
    type=CIN
    cinlibraries=Kernel32.lib
    CINTOOLSDIR=path_to_cintools_directory
    !include <$(CINTOOLSDIR)\ntlvsb.mak>
    4) Go into Visual C++ and File>Open and open the .mak file. You can even Add the name.cpp file to the project to make it easier to edit. Select that name.cpp or open it as a text file in NotePad or and edit the prototypes of the CIN MgErr functions as shown below, adding extern "C" at the beginning of the line. extern "C" CIN MgErr CINRun(float64 *INPUT);3) Select Build.exe to create the "name.lsb" file. To import the .lsb into LabVIEW, right-click on the CIN and choose "Load Code Resource...". Then, choose the name.lsb file and it is ready to run!
    If you want to use several C++ source code files with .cpp extensions, then compile them in Visual C++ and link them to name.cpp and create a .lsb by modifying the name.mak as follows:
    name=name_of_cpp_file_without_the_extension
    otherobj=other_cpp_files_BUT_USING_.obj_extension
    type=CIN
    cinlibraries=Kernel32.lib
    CINTOOLSDIR=path_to_cintools_directory
    !include <$(CINTOOLSDIR)\ntlvsbm.mak>
    It's worth a try? I have also heard of using clusters to represent classes, so you could check that out.
    J.R. Allen

  • What is the best way to integrate a sound file (mp3) into a PDF?

    I saw that its possible to do it by Tools->Multimedia->Sound. This works fine on a computer but not a tablet. So what is the right way to embed a sound file into a PDF of maybe by Indesign? What i want is that people can easily open a document (PDF) on a tablet and when they click on a (play)icon that they hear a sound file. The best thing is that they can stop or put it on pause.

    I think this functionality relies on Flash, so it's not likely it's going
    to work on mobile devices, certainly not on iOS ones.

  • What is the best way to share for large projection?

    I would like embed my movie as part of the Powerpoint to be shown on a Windows machine (my only option). What is the best way to share it so that it doesn't look grainy or pixelated?

    Fool proof? Does Mircosoft make Powerpoint?
    LOL... but seriously
    You could export it out to a Windows Media file.
    http://www.Flip4Mac.com

  • What is the best way to set up iTunes on our home network so all family members have access to all of our itunes library, even music we don't have on the cloud?

    I have five different people using 10 different apple devices on one itunes account in our family.  We have had trouble sharing.  What is the best way to set up itunes on our home network?  We have purchased music that sits on icloud, but we also have music we have imported from our previous cd library.  Our itunes program keeps crashing and dumping everyone's playlists.  So far we have all been using just the one desktop computer to sync to because we can't figure out how to share the same librarly and playlists on multiple computers in our home so devices can be synced at any location as well as playlists and purchases be made. 

    What is the best way to set up itunes on our home network? 
    One iTunes library per person.  One iTunes account per person.
    If people wish to share songs, they can make copies.
    When the inevitable day comes when the kids get older, you will not have to come back here and post asking how all that stuff can get separated!

  • HT1349 I lost/had my iPhone stolen. Tried using Find My iPhone and it's offline. It was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Tried using Find My iPhone and it's offline. It (Find my iPhone) was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Find My iPhone is good for misplaced iPhone but not good for thief and it was never meant to be.
    You chance of getting it back is very small.
    There are a few things you can try.
    Try remote lock/wipe your iPhone through Find My iPhone.
    https://www.icloud.com
    You can report to the police, cell carrier (expensive cell charges for international calls, roaming etc)
    Change all the passwords used in iPhone: Apple ID, E-mail, Bank Account ....
    http://support.apple.com/kb/HT2526

  • What is the best way to read and manipulate large data in excel files and show them in Sharepoint

    Hi ,
    I have a large excel file that has 700,000 records in it. The excel file has a few columns that change every day.
    What is the best way to read the data form the excel file in fastest and most efficient way.
    2 nd Problem,
    I have one excel file that has many rows each row contain some data that has certain keywords.
    What I want is  to segregate the data of rows into respective sheets(tabs ) in the workbook.
    for example in rows have following data 
    1. Alfa
    2beta
    3 gama
    4beta
    5gama
    6gama
    7alfa
    in excel
    I want there to be 3 tabs now with each of the key words alfa beta and gamma.

    Hi,
    I don't really see any better options for SharePoint. SharePoint use other production called 'Office Web App' to allow users to view/edit Microsoft Office documents (word, excel etc.). But the web version of excel doesn't support that much records as well
    as there's size limitations (probably the default max size is 10MB).
    Regarding second problem, I think you need some custom solutions (like a SharePoint timer job/webpart ) to read and present data.
    However, if you can reduce the excel file records to something near 16k (which is supported rows in web version of excel) then you can use SharePoint Excel service to refresh data automatically in the excel file in SharePoint from some external sources.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Custom Report : What is the best way ?

    Hi!
    My customer doesn't like native TestStand 's report layout. He would prefer something like the example enclosed to this post.
    What is the best way to achieve this ?
    XSL customizing (seems heavy work) ?
    Using the report generation toolkit  and a Word template ?
    Any other idea ?
    Attachments:
    Report Style.JPG ‏115 KB

    Have you examined all of the examples found in the TestStand help:

  • I have an old 30" apple cinema display (2005) I want to use as a 2nd monitor to a new iMac (2012).  I don't just want mirror image of iMac; what's the best way to do this?

    I have not bought the iMac yet but will do so very soon and just want to make sure I have what I need to get everything setup including adding the old faithful 2005 30" cinema display.  Currently I am driving the old 30" cinema display with a macbook pro also purchased 2005 and happy to say I got a lot of good miles out of this rig.  What's the best way to connect the old 30" monitor as a second display for the new generation iMacs?
    Other Questions
    I can find online new in unopened box a 2012 iMac 27" i7 with 1T Fusion Drive for $1899 no sales tax.  This seems like a pretty good deal since I notice the same is available from Apple refurbished for $100 more plus sales tax.  I know that they say the Fusion drive is a lot faster on 2013 models but some of the speed tests I reviewed online showed the 2012 i7 and 2013 i7 very close on speed for both storage and processing.  Any thoughts?
    I don't like changing batteries so I would buy a separate Apple keyboard with numeric pad since it only comes with wireless keyboard.  I'm a trackpad enthusiast having been using my macbook pro trackpad with current set up; and I am prepared to buy the Apple trackpad and replace batteries every 2 months but I would greatly prefer USB connection and rechargeable trackpact.  I know Logitech makes one so if anyone is using and knows how it compares to Apple's I'm all ears. 

    <http://support.apple.com/kb/HT5891>
    You can use USB for the Apple trackpad.
    <http://www.mobeetechnology.com/the-power-bar.html>

  • I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?

    I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?
    Facts:
    In moving to a new iMac, I copied the iPhoto library to an external HDD assuming that I would point the new iMac to the backed up iPhoto Library
    All worked fine when I pointed the new library but noticed that some folders contained aliases and not the original file. So when I attempt to open that photo it can't find it because the alias is pointing to another drive.
    I do have all original photos from a couple of external HDDs. In the folders titled, "Originals" (from older versions of iPhoto) and "Masters" (from current iPhoto)
    I'm thinking I can create a new folder and drop the original files and make that my new iPhoto library. Is there a better way to rebuild my library? I do not want to create any future aliases.
    Thanks in advance for any help!

    do you have a strongly recommended default "managed" library (the iPhoto preference to "copy imported items to the iPhoto library is in its checked state) or a referenced library - you have unchecked that option?
    It sounds like you have a referenced library and are now experiancing one of the very siginificant drawbacks of a referenced library and one of the many reasons they are strongly not recommended
    Also note that iPhoto '11 may use alises in the originals folder as part of the upgrade
    It is important that we understand exactly what you have and what is not sorking - what error messages you are getting
    You must NEVER make any changes of any sort to the structure of content of the iPhoto library - there are no user servicable parts in it  --  and you can not rebuild yoru librtary - only iPhoto ir iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  can rebuild a library unless you are a SQL programmer and understand the structure that iPhoto uses
    LN

  • What is the best way to open emails and attachments without using wifi?

    For I-phone and I-pad, what is the best way to open emails and attachments without using wifi?  I turned off wifi in my settings but my boss thinks there may be another way and a better way to use something else instead of wifi.  Any help would be appreciated!  Thank you!

    Thanks!  That is a very good question you post.  My boss asked me that and I am assuming that he is having issues with using wifi wherever he is at.  My boss is the kind of person that when he asks something you look into it and ask him no questions...he's the only one asking questions!  But thank you for your response I will tell him the information you told me and hopefully that will help!

  • What is the best way to open a HTTPS connection?

    What is the best way to open a HTTPS connection and retrieve the content as XML? This is how most of the online API is done nowadays, how can this be done on the iphone SDK?
    Thanks

    Have a look at the SeismicXML example that comes with the iPhone SDK. It uses http instead of https but it may work for you.
    You can also look at the NSURLRequest and NSURLConnection classes.
    Enjoy.

Maybe you are looking for

  • ITunes 9.2 won't start - 13014 error

    Just installed itunes 9.2 update and get "The iTunes application could not be opened. An unknown error occurred (13014)". I had installed all available iTunes updates before. My MacOS version is 10.6.3. (installed it back after 10.6.4 upgrade because

  • What is the best practice for Enumeration for ADF?

    Dear All, What is the best practice for Enumeration for ADF? I need to add enumeration to my application. ex: Gender, Marital Status. How to provide? Custom Declarative Components or are there any other way? Thank you. Erdenebayar

  • Iphone 5 S can't get sync with itunes installed on windows 2003 server SP2

    After successfully installed itunes 11.1.5 for windows (i'm using windows 2003 server SP2 32bit). Whenever time I connect my iphone 5S to this computer, it always pops up an error message "This iPhone cannot be used because the required software is n

  • PLM search (wda_sea_qs) gives page not found when started from portal

    In NWBC the PLM search works fine. For result it starts the result webdynpro. We use PLM from the portal so I have created an iview for the webdynopro wda_sea_qs. When I click on advanced search or search for something the navigation to the other web

  • Layout of JLabels and JTextFields

    Hi! I am looking for an easy way to layout JLabels and JTextFields side by side like this: jlabel             jtextField small jlabel       jtextField longer jlabel      jtextFieldAny ideas on how to do this? Peter