I am using Qualtrics. I have a survey in 4 languages. I want to pre-select language say to German & Dutch and don't want other languages to be displayed. One of the other languages is a primary language so unfortunately I can't delete it. Have a nice day.
You can add CSS to hide the language selector. Under Look&Feel/Advanced/Add Custom CSS, add the following:
.LanguageSelectorContainer {display:none;}
Then use a contact list (panel) or url parameter to pre-select the language.
Related
I am in the brainstorming phase of a website and trying to select how to write my CSS. The website will support two languages. One language is latin based, think French, and the other is not, think Arabic. Arabic is rtl language. Also, that means menus text are going to change along with other elements. For example if I have a menu button with "Who are we", it must be translated to the other language.
Do I need to define two separate CSS files and pick one based on region/or user selection? Or is there a better way to approach this?
Also, when it comes to changing menu text, do I change only these fields or the entire HTML? Or it depends on the amount of text needs to be changed per HTML page?
The way I do it, in vanilla JS, is I make a copy of each text element for each language and add language class to it(so I can query select it later). Make a html selector for languages. From JS I add class "hide" to all elements belonging to unselected languages. All CSS that class hide contains is display:none. Frameworks, like Angular, contain more elaborate solutions, but for JS this one makes due.
For react you can use npm install i18next react-i18next --save. This solution will leave you with much cleaner view template since there you are just going to name every text field and then in code add to each field its possible translations. As margins, alignments and rest of css goes, usually you donĀ“t even have to touch it, translated text is usually quite similar so if there are breaking differences go with individual solutions. For example, since Arabic is written from right to left, add class with text-align: right; when detecting Arabic.
I have panel module installed and enable in my site which is built in drupal 6.26 and the version of my panel module is 6.x-3.10. I have created many blocks with the panel and I am having two languages in my site : English and French.
I have also installed and enabled Translation module. Its working fine for other things but not for the title of the panel.
I have searched a lot for this on net but not getting proper solution yet.
thanks in advance.!
If you require any sort of i18n or l10n (internationalization/localization) for Drupal, you should review this doc:
http://drupal-translation.com/
Answering your question, this is taken directly from drupal-translation:
reference: http://drupal-translation.com/content/translating-block-contents#
Drupal's i18n module can translate block contents.
To display blocks in multiple languages, you can use one of these
approaches:
Creating a different block for each language. Using string
localization When you create a block, you can choose to assign it to a
specific language or to all languages and use string translation.
Method 1 - different blocks per language Select a unique language for
the block and indicate which nodes to display it for. You should
select only nodes that are written in the same language as the block.
Then, create similar blocks in other languages and enable them for the
nodes in those languages.
This process will keep complete isolation between blocks in different
languages. They can be translations of each other, but can also
contain completely independent contents. Drupal and i18n don't offer
any facilities for synchronizing between block contents in different
languages.
Method 2 - string localization Drupal can translate strings from
English to other languages (currently, there is no solution for
translating from any language other than English). You can tell Drupal
to handle the title and contents of blocks as strings and look for
translations using Drupal's string translation mechanism.
When a block is being displayed in a different language, Drupal will
look up the title and body of the block to see if there is a string
translation of the title and body. If they are available the
translation will be displayed otherwise it will display the original
text.
In D7 I have used the following workaround :
In panels, I have added to the to the footer a translated standard node without any content (e.g. Basic page). You can also add it to any other region not impacting your layout.
For panel title I have selected the title option "From pane".
On my translated node I flagged the option "Panel title". This option it will appear only after your set your panel title to "From pane".
On the pane options for this node, I have overridden the title to blank.
Final result - the panel title is inherited from the title of the translated node, which itself is not visible.
Hope this will work for you in Drupal 6. For menu item translations, in case you will need it, I have manually added the multilingual menu links pointing to the same panel.
Is there a cascading module (e.g. Nice Menus) supports a multi-language site? i.e. depends on the current language (example.com/en > example.com/de) the menu can be translated properly (from English to German for the example). Thanks
For multilangual menus, you first need http://drupal.org/project/i18n.
You can then either have a menu per language or a single menu with a menu entry per language.
Modules like Nice Menu then just format whatever is in your menu anyway in a different way, they don't care if it's multilangual or not.
I am working on a bilingual site in the latest version of Drupal 6. I installed the Internationalization module and the Views translation module, among many others.
The problem: On /admin/build/translate/search, some elements (e.g. the view title) appear in the text group "Views" and Drupal assumes they are in German, requiring an English translation.
Other elements (e.g. exposed filter labels) appear in the text group "Built-in Interface" and Drupal assumes they are in English, requiring a German translation. But in fact all the strings are in German:
To be clear, I am not seeing an issue with the language selection or the display of the view. The issue is when the page is first parsed by the language system and any translatable strings are inserted into the translation table. Drupal assignes different source languages for elements on the same page. The result is a mix of languages, once these strings are translated.
I thought that maybe it is the language preference of the user who hits the page first that interferes with this, but once I started changing it, I ran into this issue (reading the thread was eye-opening - it should be mandatory reading for anyone considering Drupal for enterprise-class solutions). Ok, now I have the URL prefix in the mix, which means that when a user changes the language preference, the site language does not change until they manually change the URL.
Once I managed to get the page rendered in English, it turned out that Drupal does not pick up the translation strings when the display language equals the source language. So no luck there.
I am ready to code my view in 2 languages, depending on what Drupal thinks the source language is for the various elements, but even that won't work. Has anybody else experienced this?
I think that you probably had basic mistake in how Drupal multilingual system work. I did the same mistake in the first multilingual Drupal site that I've built.
The most important thing to do is - if one of your languages is English - Use English in your code. if you need to put the word 'room' in one of the template use t('room') and not t('zimmer'). Your view titles? use English. Tag names and description? use English. The primary language should be English. After you setup your English site, you can translate your site using translate interface. I know it sound strange to one that his mother tongue is other than English, but I made several multilangual sites with i18n and it is the right way to do it with minimal complications.
Changing the admin interface language only change the interface - not the value. If you change the interface to German (i.e yoursite.com/de/admin/views) it doesn't mean that you are on 'German views'. It is the same view.
There are some exceptions - Multilingual variable as I explained here: How can I set a different homepage per language in Drupal?
I hope that is helpful.
I am working on a multilingual web application. I'm wondering how do i design the best user interface that the user can localize data for various languages? for instance, in making a page which its title is different in every lang, do i put a textbox for every one? it's not a suitable way to do(in case of 10 lang, the user has 10 textbox!!! too silly)
what is your idea about this?
Edit: i have no problem with globalization in my system. in fact, i'm looking for a good way for my interface design which user can enter his data to my forms in various langs.
thanks in advance
What about only one textfield and a dropdown containing the languages. After selecting the language and filling out the textfield the field gets submitted and the chosen language disappears from the dropdown list.
the entered value and language then appears beneath the dropdown and textbox with a way to edit/delete it. this way it's always clear to the user which languages are already covered and which values are assigned to them. furthermore it's a nicer way if not all 10 languages have to be mandatorily filled in, if the user e.g. just knows english and french.
Hope you know what I mean, otherwise I'll have to create an example screenshot :-)
You could have 3 text boxes, and that's fine...get to 10, and it starts getting a bit crazy. Beyond that it starts looking pretty bad.
Maybe you could put up to say 5 text boxes up...but if it goes beyond 5 (because the user desires localization for more than 5 places) it places a single textbox with a dropdown next to it, and the dropdown would contain the current language.
Textbox would auto-populate with the current value for the language selected in the dropdown. Should work well in asp.net, and it can be done both client side, or server side on a post back pretty easily, so you don't need to do anything crazy for people not running javascript.
You have one text box.
On load you populate the text box depending on language.
The content will be populated from some kind of resource file. If there isn't much text it could even go in your config file.
Be aware of the following:
Different content length depending on language.
Right to Left alphabets screwing up your alignment
This is a classic project for using NUNIT or similar to promve that things work after new translations are added!
What language do you use in development? If this is something like PHP, then you definitely should use templates and load text strings into them from configuration files for every language. In Smarty, for example, I use configuration files for that.
Text strings for error messages or something like that could be put to files like .ini and loaded from there.
The Google Web Toolkit (GWT) demo shows the same page with versions available in English, French, Arabic and Chinese.
The GWT docs have a thorough discussion of internationalization. You could emulate their implementation.
Constants: Useful for localizing typed constant values
Messages: Useful for localizing messages requiring arguments
ConstantsWithLookup: Like Constants but with extra lookup flexibility for highly data-driven applications
Dictionary: Useful when adding a GWT module to existing localized web pages
Remember that dates and times are represented differently in different locales, if your forms use them.
The W3C also discusses Internationalization Best Practices in HTML content.
Normally, a user navigating a website will have a preference specifying the language of the whole site. I think it would be confusing to break this pattern.
So, in an intro page, or a user preferences page, allow the user to select a language; then, on the other pages, display a consistent set of controls to be able to edit the content on each page.
Are you making an administration page that allows users to change the text used in other pages in the application?
If so, you could use grid like in Zeta Resource Editor:
thumbnail http://img202.imageshack.us/img202/7813/zetaresourceeditor02.th.png
Or you could make a per-language list like in nopCommerce:
thumbnail http://img249.imageshack.us/img249/9079/nopcommerce.th.png
You can use javascipts as a resource file for your language like. language_arabic.js, language_english.js,etc.So when a use wants to see his preference language he/she has select the available languages from drop down list. Regarding this the user has to change the language settings from his/her computer. This is what I did while I was working a GIS project to customize a Geocortex IMF( http://demos.geocortex.net/imf-5.2.2/sites/demo_geocortex/jsp/launch.jsp ) site for an Arabic client.