I'm using the Typo3 Formhandler extension to build a simple reaction form. The form works correctly only the error response is in English and not translated. By typoscript I included a languest file.
langFile = fileadmin/templates/sandraverdijck/lang/newsletter.xml
The languest file includes the Dutch translation, see file below.
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<data type="array">
<languageKey index="default" type="array">
<label index="error_sender_name_required">Naam is verplicht</label>
<label index="error_sender_email_required">Email is verplicht</label>
<label index="error_sender_email_email">Email is niet correct ingevult</label>
</languageKey>
</data>
</T3locallang>
The response is still in English like "Your name is missing", I don't know where it gets this from and why it is not using the text from the languest file? When I don't include the languest file I get an error so the file is used. Anyone some idee?
Your language key is default. Is Dutch the default language of the website? Are you setting the language through
config.language = dk
? If so, try using the according language code in the XML file:
<languageKey index="dk" type="array">
Related
How can I get a translation string in TYPO3 Backend?
In language overview in Backend, I have my custom Content Elements displayed.
If there is no link title set, the button has a language specific default value:
EN: Read more
DE: Mehr erfahren
In Frontend, we have <f:translate, but in Backend this does not work?
Version: TYPO3 V10 LTS
depending on where your label is. the string is defined in TCA (Table Configuration Array) or Flexform. in both cases you use an LLL reference instead of the label
usually somthing like this:
LLL:EXT:my_ext/Resources/Private/Language/backend.xlf:my_label_name
let me pick explain the diffrent parts:
LLL: proccess this aht Local Language resource (similar to http: in an URL)
EXT: this is an Extension Path chheck prefixes like typo3conf/ext/ or typo3/sysext
my_ext/Resources/Private/Language/backend.xlf the path to the file
:my_label_name the label inside the file
<f:translate> does work in the backend as well.
The language file should at least look like:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2013-08-22T11:22:55Z" product-name="efemtpy">
<header/>
<body>
<trans-unit id="title">
<source>Title</source>
</trans-unit>
</body>
</file>
</xliff>
Maybe you forgot the <source>-Tag like I did before.
What is the best way to render link field in TYPO3 fluid template?
Link field is defined via flexform as:
<field_link type="array">
<TCEforms type="array">
<config type="array">
<type>input</type>
<eval>trim</eval>
<wizards type="array">
<link type="array">
<type>popup</type>
<title>Link</title>
<icon>link_popup.gif</icon>
<script>
browse_links.php ? mode = wizard & amp;
act = page
</script>
<params type="array">
<blindLinkOptions>file,spec,email,folder</blindLinkOptions>
</params>
<JSopenParams>height=300,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
</link>
</wizards>
</config>
<label>link</label>
</TCEforms>
</field_link>
Fluid comes with viewhelpers such as link.email, link.external, link.page but my link field could be either page id or external link or email or link to sys_file record. How do you handle that in your projects without making multiple if statemens in fluid template? (custom viewhelper?, typoscript object)?
You can also use the f:link.page to generate links external urls or files, that does not matter as internally typolink is used.
If you are using the wizards like in your example, you should use the f:link.typolink viewhelper which supports all attributes.
Link for email works perfect
here my flexform:
<settings.link>
<TCEforms>
<label>Link</label>
<config>
<type>input</type>
<size>30</size>
<eval>trim</eval>
<softref>typolink,typolink_tag,images,url</softref>
<wizards>
<_PADDING>2</_PADDING>
<link>
<type>popup</type>
<title>Link</title>
<module>
<name>wizard_element_browser</name>
<urlParameters>
<mode>wizard</mode>
</urlParameters>
</module>
<icon>link_popup.gif</icon>
<script>browse_links.php?mode=wizard</script>
<params>
<blindLinkOptions>file,folder,url,spec</blindLinkOptions>
</params>
<JSopenParams>height=500,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
</link>
</wizards>
</config>
</TCEforms>
</settings.link>
Output:
Liunk
We have a XML file that is on somewebsite and looks in a way like this (confidential parts stripped)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="https://somewebsite.com/crm/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">Accounts</title>
<id></id>
<updated>2016-02-04T08:36:56Z</updated>
<link rel="self" title="Accounts" href="Accounts" />
<entry>
<title type="text"></title>
<updated>2016-02-04T08:36:56Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Type>A</d:Type>
<d:UniqueTaxpayerReference m:null="true" />
<d:VATLiability m:null="true" />
<d:VATNumber m:null="true" />
<d:Website m:null="true" />
</m:properties>
</content>
</entry>
<link rel="next" href="https://somewebsite.com/Accounts?$skiptoken=guid'ee6bc390-a8ac-4bbd-8a4d-0a1f04ab9bd3'" />
</feed>
We use the new Rest connector to get the data out of this XML file.
The XML has pagination and every 60 entries you can load the next 60 with the link at the bottom of this xml file.
The problem i have is when, in the REST connector, we want to enable pagination with these setting:
Pagination Type: Next URL
Next URL field path:
/*[name()="feed"]/*[name()="link"][contains(#rel,"next")]/#href
It doesn't seem to work...
side note: the XML file has namespaces so i need to target the elements this way instead of /feed/link/...
I'm using Xpath syntax to target the link href, but maybe this is not the way to go? Or maybe the REST connector isn't using Xpath syntax?
Really hope someone can help me!
Actually it turns out that this seems to be due to a "bug" in the "Qlik REST Connector 1.0" so the pagination doesn't work.
But there is a fix for it:
1) Make sure that the Qlik REST Connector 1.0 connect dialog box has the NextUrl set to:
feed/link/attr:href
2) When the SQL has been generated after using the SELECT-button and going through the wizard you have to modify the sub-SELECT that reads like this:
.....
(SELECT
"attr:rel" AS "rel",
"attr:title" AS "title",
"attr:href" AS href,
"__FK_link"
FROM "link" FK "__FK_link"),
.....
On line 05 you will have to remove the text AS href.
So it should look like this:
.....
(SELECT
"attr:rel" AS "rel",
"attr:title" AS "title",
"attr:href",
"__FK_link"
FROM "link" FK "__FK_link"),
....
3) Find the LOAD statement that loads from this sub-select with a RESIDENT [MasterREST further down in the load script and make sure that the reference to href is changed to [attr:href] - or else you will get an error message while loading.
Should look like this after the change:
[link]:
LOAD [rel],
[title],
[attr:href],
[__FK_link] AS [__KEY_feed]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_link]);
This worked for me:
/*[name()='feed']/*[name()='link'][#rel='next']/#href
Yours should also work actually, maybe whatever you are using does not agree with double quotes instead of single quotes.
I want to do a Multilingual Version of my Extension. In case of this I completed the Resources/Private/Language/locallang.xlf
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xliff version="1.0">
<file source-language="de" datatype="plaintext" original="messages" date="2014-12-16T23:29:45Z" product-name="rere" target-language="en">
<header/>
<body>
<trans-unit id="tx_rere_domain_model_note">
<source>Note</source>
<target>Note</target>
</trans-unit>
<trans-unit id="tx_rere_domain_model_note.notenr">
<source>Notenr</source>
<target>Notenr</target>
</trans-unit>
It's a valid xml file.
Then I added in the html files this:
<f:translate key='tx_rere_domain_model_note'/>
But in the view there isn't shown anything ... als is blank
what's going wrong?
To switch to other languages you need to include a Navigation that lets you do just that. Language Menus are just a special type of navigation in Typo3.
Look up, what uids your languages are assignes to in the sys_language table - usually 0 is the default, and every language you add gets an entry with a uid incremented by one - so, given 0: english, 1: german, the most basic configuration would look like this:
lib.languages = HMENU
lib.languages {
special = language
special.value = 0,1
}
It's explained more thoroughly in the reference:
http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Hmenu/Index.html#hmenu-special-property
Remove the extension key. You don't need it as long as your view is inside the same extension. Try this:
<trans-unit id="note">
<source>Note</source>
<target>Note</target>
</trans-unit>
<f:translate key='note'/>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>database</type>
<description>Language labels for extension 'dagou_user'</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<!-- Email -->
<label index="email_notify_employer_body"><![CDATA[A new Employer has signed up!<br /><br />Account Name: ###USERNAME###<br />Email: ###EMAIL###<br />Full Name: ###NAME###<br />Company Name: ###COMPANY###<br />Location: ###CITY### ###STATE###, ###ZIP###]]></label>
<label index="email_notify_employer_subject">New Employer</label>
...
</languageKey>
</data>
</T3locallang>
Above code is taken from locallang_dagouuser.xml, meanwhile I am reading this document: http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.1.0/view/7/2/
Questions:
For type="array", is there any other value I can assign for type? such as type="string"...
<type>database</type>, in the document, it is said "database" : Used for labels of database tables and fields., what does this mean? how could I use these labels with DB tables and fields?
No, there is just this one type.
This is just a hint for the reader what the purpose of this language file is. When you take at look at the TCA of the extension, you will see something like
'label' => 'LLL:EXT:cms/locallang_ttc.xml:sys_language_uid_formlabel'
This is one of the places those language labels for database fields are used.