I have been developing a multilingual website using Drupal 6. The languages are English and Spanish. I want to have some different backgrounds and css for them. But both use just style.css.
How can I create different style.css file for them? For example style-sp.css for Spanish one and en-style.css for English one ?
Is it possible ?
append to template.php in your theme this code:
global $language;
drupal_add_css(path_to_theme().'/style-'.$language->language.'.css','file');
Related
How can I remove un-used CSS, Images & JS codes from my project?
If a project is bigger; usually there are lots of trash codes specifically if the project is built based on another similar project.
May be its late for this answer but, i have the same thinking an i can just tell you to few options.
There is NodeJS powered libraries doing the cleaning unused css selectors. Some of them really smart even if you used merged class name parts in javascript.
You can find those just by google it like "remove unused css"
And, i find the few videos on youtube about same topic. One of them using Visual Studio for this job but i dont tried this. Link here: Youtube Link
Another option is Chrome Dev Tool. Just use chrome developer tools audits tab.
Sorry for little confusing text but i have only those.
I hope it will fix your problem or satisfy expectations.
I have a slight problem here and a doubt. I have created a page which has three components added in three different placeholders. This page was created for English version. I need this page and the components to get added in German version of the page as well.
I read a few articles that illustrate the use of layout deltas and "Final layout" feature of Sitecore 8 but got a little confused over this matter.
Article1
Also, I have checked the __Renderings setting in /sitecore/templates/System/Templates/Sections/Layout and the Shared field is checked. Still the layout is not shared.
Am i missing any settings ? Do I need to every time create both versions i.e. repeat the layout steps for German versions as well ?
All suggestions welcomed.
If you are using Sitecore 8.0 and adding the component via the Experience Editor then you will need to add the components to each language variation of the Item, i.e. once for English and once for German. This is because the components are stored against the Final Layout field when added through the Experience Editor and the field is language specific.
The only option you have is to add the components to the Shared Layout manually by selecting the Presentation > Details from the tabs.
If you need to add the same components to all language variations at the same time then I suggest you upgrade to Sitecore 8.1 which will enable you to do that via Edit all versions option in the ribbon:
Edit: As of Sitecore 8.1 update-1, the Shared Layout can be edited using the "Layout Switcher" under the Presentation tab:
I start to use Asset Publisher in liferay. I added an article with some text in english. Then I want to add translation but there was no my language. So I added into portal-ext.properties next lines to enable more languages.
locales.enabled=ca_ES,zh_CN,en_US,fi_FI,fr_FR,de_DE,iw_IL,hu_HU,ja_JP,pt_BR,es_ES,cs_CZ,sk_SK
My language then appear, but the problem is the translation doesn't work. Not to my language, it doesn't work to any other languages. All it did is it just changed the font of the text. That's all. Can you help me and tell me what should I do? Thanks a lot.
Seems to be solved on the Liferay forums: You'll need to provide the translation yourself. Liferay offers the functionality to enter translated articles, but it doesn't translate the articles itself.
If I may add a personal remark: "...luckily". Automatic translation is not that good.
I'm looking for a client-only plugin that can search through a site recursively, looking for a search string on the page or within directly linked text files (.txt, .java, .properties, etc...). The website is an intranet website, so it's restricted (which is why I can't use Google Search).
A lightweight downloadable program would do as well...
I found an addon for FireFox called FoxySpider, which does what you want.
It has a "general" search function which searches for all files of a specific type, and a more "specific" search function.
For the general search: Customize the filetypes you would like to include in the settings panel (firefox addons page).
For the specific search:
Middle-mouse-click on the icon next to the url bar in FireFox you can specify exact filenames.
You can find the add-on here: https://addons.mozilla.org/sv-se/firefox/addon/foxyspider/
Br,
Tim
I am developing a website which has both English and Arabic versions. I have installed Arabic language and the i18n module, which is working fine and I am able to add Arabic translation for the English contents.The URL prefix 'site.com/ar' is also working fine.
Since Arabic is a right-to-left language I want to show different theme for the Arabic content,which contains images with Arabic text etc.(a flipped or mirror version of the English theme with Arabic text).
Is there any good solution for this scenario where site.com/ar should show the Arabic theme and site.com/en should show the English theme?
Thanks,
You may be able to use the Sections module to switch the themes, based on the path.
I'm not sure if this would help with right-to-left languages, but you may also consider adding body classes based on the language and using those to modify the theme.
You may also find Notes on Setting up a Drupal Site for Internationalization and/or Internationalization & RTL Drupal Theming helpful.