Node-RED on Bluemix, using the language translator node, documentation as follows;
Source and destination language parameters can be configured through
the editor panel or set dynamically using the language codes in the
following properties, msg.srclang and msg.destlang.
Setting msg.srclang & msg.destlang doesn't appear to work however. Regardless of the values assigned to these properties, the values defined in the editor are applied when translating.
Is it possible to dynamically set the source/target language values using the language translator node on Bluemix?
Thanks,
Ronan
Message properties passed in only normally apply if the values are left blank in the config editor dialogue
This is a bug introduced in a recent revamp of the node. I have raised a bug report and hope to get this fixed soon.
Related
Hello 👋 pls has anyone here used the Whatsapp cloud API, I need help in the aspect of creating a template. I have created one, but when I try across via the API, I keep getting template not available in specified language code.
I tried creating another template in another language but still got the same error.
You need to pass the proper language "code" from the supported list as per the link,
https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages
Currently I work an an app where the user can create products for a catalog. The status is, he can do this in one language, data gets send to the backend and saved. The next step would be to make this creation process ready for multiple languages e.g. english or french. The behaviour should be the following, he choses the language inside a drop down field and gets a form in the selected language.
The problems I encountered and my solution process till now:
1) How should the view handling be? Should I create a new fragment for every language and exchange the content? If Im correct that would mean I would need to destroy and create fragements for the languages, right? And then create them with a binded model again.
2) How should I handle the model/models? Should I create one model with the data they share e.g. creation date and create a model with language related attributes? That would be my solution right now.
Maybe you already did something similiar or have some thoughts about this, thanks for any help!
You should do neither of those things. There are mechanisms in place, generally referred to as i18n that help you with this process. UI5 help available here:
https://ui5.sap.com/sdk#/topic/df86bfbeab0645e5b764ffa488ed57dc
and
https://ui5.sap.com/sdk#/topic/5424938fc60244c5b708d71b50a0eee4
In summary, translations should be done using the i18n mechanisms and the oData logon language.
Logging into the application, assuming it's hosted on an SAP gateway or SCP / Launchpad, the user's current logon language will drive at least all standard SAP translatable texts like the labels returned from data elements in your oData services. The appropriate url parameter is sap-language=EN, but it's set automatically from the current browser settings. Generally, you don't have to worry about this.
The same browser settings drive which particular i18n file is loaded. This could be specific like en_US for American English, or fr for French.
If you code your app without any hard coded translations but always follow the rules in the links above, adding a language should be trivial.
These translations could probably be triggered programmatically via a dropdown as well but I have never tried that since it's extra steps for my users.
I'm new to CQ5 and working on a project that deals with refactoring code that uses design dialogs.
Currently, I have a property declared as part of design dialog of my component. It creates a folder in /etc/designs/ for each template my component is used on. Is there a way we can make sure that those property values are stored at one particular configuration in /etc/design(as opposed to multiple)? I need to make sure only one set of configurations is used for all pages that use my component.
Thanks in advance!
Pallavi
The designs are linked to the template and not the whole site.
Hence whenever you configure the component in design mode, the values are stored within the corresponding template under the jcr:content of the configured design page or under /etc/designs/default/jcr:content in case no design is configured.
As far as I know, there is no way to tell AEM to store all the design configurations under one single path, unless you are using absolute paths in your dialog / page configurations.
If you are using multiple templates in your site, there must be one master template (which render global components eg. header/logo/navigation & footer), and all other templates should extend master template to get these global components and change pagelayout for content section.
Saying so, if templates are structured & inherited properly, you should be able to set design dialog property on home page (created using master template) and all internal pages will be able to access those design property OOB. Though child pages (created using other template) can override those design property (if needed for that template) to break inheritance.
I've got a small problem with a TYPO3 extension.
The extension is translated in english and german (default is german) and I now need to switch the language programmatically.
Reason: We got some cronjobs running that create files using the language selected by the user for certain tasks (e.g. creating bills).
I am using TYPO3 6.x with Extbase and Fluid.
In your cronjob, change the language of the current backend user. You can use the $GLOBALS['BE_USER'] variable to access this. It has a property for the language. However, you might need to reinitialize the language service. How a look into the bootstrap to see how this is done.
Based on what GWT at the client side knows about the time-zone? Is it somehow retrieved from user-agent (browser) which in turn has it from OS settings? I tried tinkering with my OS time-zone settings but did not any different.
Is there a way to set the default time-offset/time-zone to be different at the client side code? Reason for this is usage of Date api methods which apparently return results based on the defaul time-offset/zone settings.
You cannot change settings on a user's computer or in a user's browser. That would be a huge security hole.
To display date in the desired time zone, create and pass a TimeZone object to the DateTimeFormat.format() method.
Please have a look at my post Setting locales in gwt.xml do not work where I have explained it with sample code.
Specially look at gwt.xml and where you can define locale.
Hint:
create the DefaultDateTimeFormatInfo based on client (browser/navigator) language
create the DateTimeFormat based on DefaultDateTimeFormatInfo