Syntax of Adding user Menu in moodle - menu

I am trying to add user menus in moodle 3.3.1 version but i am facing some problem in understanding the meaning of each terms "langstringname, componentname". can you please explain them with any example.

Language strings in Moodle are stored within a particular plugin and given an identifier within that plugin.
So, for example, the HTML block has English language strings stored in "blocks/html/lang/en/block_html.php". This file includes lines such as:
$string['leaveblanktohide'] = 'leave blank to hide the title';
To output 'leave blank to hide the title' (or the translated equivalent in the user's own language) from your code, you would write:
echo get_string('leaveblanktohide', 'block_html');
Where 'leaveblanktohide' is the 'langstringname' referred to in your question and 'block_html' is the 'componentname' referred to in your question.

Related

Are SharePoint Column / Field variations gone in SPO?

For years I created columns in SP in the following way:
Fix browser accept-language header to default language of site
(e.g. en-US)
Create column with an internal name
Rename column to default language name
Fix browser accept-language header to next language (e.g. de-DE)
Rename column to next language name
This worked and the translated names are still shown.
I now tried the same steps on 2 new sites on different tenants and it seems variants are not longer created: always all languages are changed.
resx files created by Site settings > Export Translations does not contain newly created fields / columns.
Was this feature removed?
If yes: what is the current way to create multilingual data-lists (one list filled by many users in different countries/languages)?
If no: has the way to translate fields / columns changed? Or is this a (temporal) bug in current SPO?
The multilingual user interface (MUI) works exactly the same way in SharePoint Online as on premise. However your browser's Accept-language is not the only thing that governs the current UI language, your profile language is another factor, and you have to wait for it to take effect.
When you change your language in order to enter the column names in a different language, check that at least some of the built-in UI, menus, edit link, etc, is in the new language. Bits of it are cached and will take a long time to be in the right language, but as soon as some of it changes, you are good to edit those column names and any untranslated navigation while you are at it.

Limesurvey encoding behaviour of other option

I am using Limesurvey Version 1.92+ Build 120425. I am having a multiple choice question (List item with multiple possible answers) that has an open "other option": For example
Question7: Why do you like ice cream?
Because it´s sweet (Q71)
Because my dog likes it too (Q72)
Because other (please name other):_____(Q73)
In this case you expect Limesurvey to code the data as followed. Q71=1 or mising Q72=1 or missing Q73=1 or missing Q73other="Text".
For some reason Limesurvey just codes the "Text" into a variable but won´t code the corresponding 1 into a variable. Q73 won´t exist in an export of my survey data.
Is this a known problem?
UPDATE:
I compared Limesurvey behaviour of my version with the current available version of the official Limesurvey demo. While in the older version it was possible for a participant to select the other option and not write text into it in the latest version of Limesurvey the other option only gets checked if there is a text entry. The respondant seems to have no means of selecting the option otherwise.
I could think of two solutions to this 'problem' (i do not expect Q73 to be 1 when text is entered in it). You could create one more subquestion, Q73, and always hide it with jQuery, then fill it if text field is getting filled, this way you will have a subquestion Q73=1/0 and Q73other='Text'/'Notext'. Another solution would be to simply create a short free text and move it up to your Q73other box.

Changing the text on a label in different languages

Not really that easy question here. :)
A customer has a field ownerid that is used as the lookup to a salesperson. I've changed the text of the label from Owner to Hazaa and I can see it take effect.
The problem is that Hazaa only displays in the English version (the base language of the installtion), while the language that is used for the users is Swedish. The users with Swedish language selected see the default translation, while they'd like to see Hazaa instead.
How can this be done?!
I could, perhaps, play around with exporting the language for translation, editing it and, then, importing back. However, that's a little, tiny, wimsy bit overkill for changing a single label. However, I suspect that only a few entities will require hazaa-fication of the ownerid field, while the rest is supposed to be left as is.
The supported way to translate the label is using the translation process (an example can be found here)
Maybe you can consider to create an unmanaged solution that contains only that entity, in order to export only the necessary labels.
There is also a tool recently released by Tanguy Touzard in his toolbox, I didn't use it yet, but you can find more information here:
http://mscrmtools.blogspot.com/2013/08/new-xrmtoolbox-plugin-easy-translator.html

UI Message default value in Liferay portlet

Does anybody know, if in Liferay is possibility to use default value in ui message ? I mean I have two files .properties with translations, for example: en.properties:
welecome=Hallo everybody
someKey=
,and default.properites
welecome=Hallo everybody
someKey=value of some key
I want to achieve, that if I use:
<liferay-ui:message key="welcome" />
<liferay-ui:message key="someKey" />
with English language (where there is no translation for key 'someKey'), the displayed value will be:
Hallo everybody
value of some key
I mean, when there is no translation for some key, liferay portlet will use value from default properties file.
regards
With the standard naming conventions, you typically have files like Language.properties and Language_en.properties. When english language is displayed, but the entry is not contained in Language_en.properties, I expect the value from Language.properties to be shown.
However, in your case you define someKey as an empty value, which means that it's defined as exactly this.
Moreover, Liferay offers a "Language Builder" tool that you can run during development time (in the plugins-sdk just run ant build-lang. It will create configured language files automatically, automatically copying the values from the original file if they are not yet contained in the translated file.
If you have api credentials for bing, it can also use these to get an automatically translated value for various languages, but I'm not a big fan of these. Actually, I'm quite annoyed by automatic translations.

Translating string in Drupal

I've developed a site in english (admin & front end) but the site needs to be in a Dutch. Locale and i18n modules have been installed.
Dutch has been added to the list of languages and set as default in admin/settings/language.
I'm now wondering how I can translate strings like the date output? For ex, when I print out a date from a view, it still outputs the days and months in English.
In admin/settings/language/configure I've selected "path prefix only" but I don't get the language code in the url's and links. How is this achieved?
Thanks
You can translate month names, days and much more using Translation interface. Navigate to:
Administer -> Site Building -> Translate interface (admin/build/translate) -> Search (admin/build/translate/search)
and use the search form to locate the string you wish to translate.
Since you've already added Dutch to your site, you can download entire Dutch translation on http://localize.drupal.org. Site is currently in beta, so you will have to login using your Drupal.org credentials.
Use this link to export Dutch translation of Drupal. Just make sure you choose All in one file format so you can easily import it in your site using Translate interface -> Import
To get the language code in the URLs you will have to enable Multilingual support for each content type you need translated (admin/content/types) by opening edit and selecting desired option under Workflow settings -> Multilingual support.
After that make sure that you specify Dutch/English language while adding or editing nodes.

Resources