Transposh
-
I have run into a stumbling block as I am not sufficiently savvy with php. Any ideas?
I am trying to get transposh to display differently in two different pages, to whit:
The transposh default is a list (ul) which is fine for some pages but I want to be able to have transposh displayed in a line i.e.
English | French | Spanish | etc
Here is the default html from transposh:
* This function does the actual HTML for the widget * @param array $args - http://trac.transposh.org/wiki/WidgetWritingGuide#functiontp_widgets_doargs */ function tp_widget_do($args) { echo '<span class="' . NO_TRANSLATE_CLASS . '">'; // wrapping in no_translate to avoid translation of this list echo '<select name="lang" id="lang" onchange="Javascript:this.form.submit();">'; // this is a select box which posts on change echo '<option value="none">[Language]</option>'; foreach ($args as $langrecord) { $is_selected = $langrecord['active'] ? " selected=\"selected\"" : ""; echo "<option value=\"{$langrecord['isocode']}\"{$is_selected}>{$langrecord['langorig']}</option>"; } echo "</select><br/>"; echo "</span>"; }I would need, I suppose, a function that has
if headerA use default if headerB use some other html that is not a list but a line.
I am darned if I can get the html into a line rather than a list and do not know how to do the If headerA do this, headerB do that.
Any help would be wonderful.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Transposh’ is closed to new replies.