See i have the following languages: [Code] de :: fr :: it ::es :: pt :: eng [/Code]
so we accordingly need to add flags but its look like funny. Therefore i came up with a sidebar in my theme (twentyseventeen the theme with the parallax-effect),
and add it to header the following code:
[Code]
<div class="drop-dl">
<a class="lang-chose" href="#"><img src=""> please now chose the language for the site - we have several ones - just choose now! </a>
<?php get_sidebar(); ?>
</div>[/Code]
susequently: in the admin page of my site i need to configure at the so called widget-section the display of the language-selector. This is needed to get a good
overview for the user of the site: Therefore i have to set up the Language-Selector to the Sidebar: that task brings up a unsorted Lists from languages.
what comes next: in the next step i add small script and css code to get this work, here is CodePen demo link
furthermore: With this (following) php code, i am trying to have more control over positioning the widget in template.
This subsequently should help us to show up the following languages/respectively flags of nations :[Code] de :: fr :: it ::es :: pt :: eng [/Code]
[Code]<!-- outputs a list of languages names -->
<ul>
<?php pll_the_languages(); ?>
</ul>
<!-- outputs a flags list (without the according languages names - that is: the names of the nations) -->
<ul>
<?php pll_the_languages( array( 'show_flags' => 1,'show_names' => 0 ) ); ?>
</ul>
<!-- outputs a dropdown list of languages names -->
<?php pll_the_languages( array( 'dropdown' => 1 ) ); ?>[/Code]
The above mentioned function will return an array of arrays, one array per language with the following entries in the array:
[id] => language id
[slug] => language code used in urls
[name] => language name
[url] => url of the translation
[flag] => url of the flag
[current_lang] => true if this is the current language, false otherwise
again: any suggestion is welcome Because this solution should go to work with "Polylang widget"
Not such a great deal, Ultimate, which gives you full 5080 features is $181.99 CAD per month, that's $2183.88 per year, I can buy the 5080 for $1809.99 CAD, then it goes up to $279.99 per month after the first billing cycle. Typical cloud rental, costs more than buying the hardware.
Wow, spoken like a true blind hater, you don't even provide arguments. Please, go check my comment above to @seacaptain and you'll find out why what you say doesn't make sense in this context...
Get used to this, with AI tooling now uncovering new vulns and getting them exploitable far faster than has ever been possible before software is going to need to be updated far more frequently.
Back in the day it may take reseachers weeks or months to do what AI can now do in hours.
Once its a threat is discovered it's weaponsized far more quickly, meaning you simply can't be waiting 2, 3, 4 weeks to deploy a patch, it needs to be patched immediately.
Going to be interesting handling this in the enterprise space where traditionally patching has been steady, but very staged (and rightly so up until now), that is going to have to change.
Question
tarifa
hello dear community,
I have installed Polylang WP plugin for one site see the conceptual view:
See i have the following languages: [Code] de :: fr :: it ::es :: pt :: eng [/Code]
so we accordingly need to add flags but its look like funny. Therefore i came up with a sidebar in my theme (twentyseventeen the theme with the parallax-effect),
and add it to header the following code:
[Code]
<div class="drop-dl">
<a class="lang-chose" href="#"><img src=""> please now chose the language for the site - we have several ones - just choose now! </a>
<?php get_sidebar(); ?>
</div>[/Code]
susequently: in the admin page of my site i need to configure at the so called widget-section the display of the language-selector. This is needed to get a good
overview for the user of the site: Therefore i have to set up the Language-Selector to the Sidebar: that task brings up a unsorted Lists from languages.
what comes next: in the next step i add small script and css code to get this work, here is CodePen demo link
furthermore: With this (following) php code, i am trying to have more control over positioning the widget in template.
[Code]if(function_exists('pll_the_languages')){
pll_the_languages( array( 'show_flags' => 1,'show_names' => 0 ));
}[/Code]
This subsequently should help us to show up the following languages/respectively flags of nations :[Code] de :: fr :: it ::es :: pt :: eng [/Code]
[Code]<!-- outputs a list of languages names -->
<ul>
<?php pll_the_languages(); ?>
</ul>
<!-- outputs a flags list (without the according languages names - that is: the names of the nations) -->
<ul>
<?php pll_the_languages( array( 'show_flags' => 1,'show_names' => 0 ) ); ?>
</ul>
<!-- outputs a dropdown list of languages names -->
<?php pll_the_languages( array( 'dropdown' => 1 ) ); ?>[/Code]
[b]question:[/b] how to do this...
can i display the language and the flag - both!?
[Code]
$translations = pll_the_languages( array( 'raw' => 1 ) );
[/Code]
The above mentioned function will return an array of arrays, one array per language with the following entries in the array:
[id] => language id
[slug] => language code used in urls
[name] => language name
[url] => url of the translation
[flag] => url of the flag
[current_lang] => true if this is the current language, false otherwise
again: any suggestion is welcome
Link to comment
https://www.neowin.net/forum/topic/1388590-polylang-wp-plugin-create-a-language-selector-with-according-flags/Share on other sites
2 answers to this question
Recommended Posts