I've got a problem with translating the client side validator in ext:form in a multi language site en/de/it/fr/cn.
But in english page I have the german translation "Bitte füllen Sie dieses Feld aus", which should not appear here.
I tried all variations of
support.validation.error.email.1221560910
validation.error.1221560910
in typo3conf/ext/site_package/Resources/Private/Language/locallang.xlf but nothing happens with german message...
I've already tried How do you translate EXT:Form forms in TYPO3 CMS 8.7 LTS?
You can translate validation error messages with the following translation keys:
<formDefinitionIdentifier>.validation.error.<elementIdentifier>.<validationErrorCode>
<formDefinitionIdentifier>.validation.error.<validationErrorCode>
validation.error.<elementIdentifier>.<validationErrorCode>
validation.error.<validationErrorCode>
Source: Documentation of the TYPO3 Form Framework, TYPO3 v8
Important: the translation keys for validation messages are only considered if you don't already have a message in the form definition under validationErrorMessages!
So please check your form definition for custom validation messages and remove them there.
you might need to define the current language in your typoscript.
instead of the older condition based on the L-parameter you now need it done with the symphony expressions:
[siteLanguage("title") == "English"]
config {
sys_language_uid = 1
language = en
locale_all = en_US.UTF-8
htmlTag_langKey = en
}
[global]
and you need the correct spelling based on your language definition in the yaml file
Related
In TYPO3 9 I managed to display the current username in a FLUID-template with the following Typoscript:
[loginUser=*]
temp.username = TEXT
temp.username {
insertData = 1
value = {TSFE:fe_user|user|username}
noTrimWrap = | ||
}
[global]
In TYPO3 10.4 this is not working anymore. Any idea how to display the current user?
Many thanks! Urs
In Typo3 V10, you have to use the Context API to retrieve data from global objects, try this :
[frontend.user.isLoggedIn]
temp.username = TEXT
temp.username.data = TSFE:fe_user|user|name
temp.username.wrap = |
[global]
Have a look at those links :
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Index.html
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Context/Index.html#context-api
Florian
It's probably not working because you're using the old TypoScript conditions. Since TYPO3 9 the conditions work with Symfony expressions. The old conditions were deprecated in TYPO3 9 (but still worked) and removed in TYPO3 10. So [loginUser=*] will never be true in TYPO3 10. You should use [frontend.user.isLoggedIn] instead.
See https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Conditions/Index.html for more about the new TypoScript conditions.
Why use TypoScript? It is very limited on what it can bring back. I just finished a tutorial where you can use a ViewHelper to add an ExtBase variable which assigns the whole user object in the FrontEnd and you can use it wherever you want with all it's relations, even the image, which is difficult to get via TypoScript.
TYPO3 tutorial
Best regards
In TYPO3 (7.2.0) using the standard template engine, is there a way to add a placeholder attribute to the standard mail form text input?
At the moment I am using JavaScript to convert the labels into placeholders, but I am open to suggestions on a better way to do this...
The suggested solution of #biesior does only work for EXT:form 7.4 and higher (see changelog). The supplied picture shows the form wizard of TYPO3 7.5 or 7.6. In 7.2 you won't find any placeholder attribute in the wizard.
I recommend updating to TYPO3 7.6 since this version includes a major rewrite of EXT:form. You will be able to use fluid templates to customize your forms. Furthermore HTML5 attributes are possible. Before the rewrite the set of allowed attributes was quite limited. Now you are able to add all attributes you can think of (for example "data-"). See changelog.
If you have any questions regarding EXT:form join the channel on Slack. If you don't know Slack yet, check out the invite function.
During form fields editing you have many properties, also Placeholder
in text version it will be:
10 = TEXTLINE
10 {
type = text
class = foo-class
id = foo-id
name = foo
placeholder = Hmmm?
required = required
label {
value = My Field
}
}
I am currently trying to implement a contact form in Neos 1.2.5, but the error messages don't get translated.
With activated content dimensions the translation of the error messages just worked fine. but we had to remove the content dimensions due to German being the only site language (and the unwanted url suffix /de, which seemed to be unremovable with activated content dimensions).
I now added the translationPackage option to my form and copied over the translation files to my site package (into /Resources/Private/Translations/de/ValidationErrors.xlf and /Resources/Private/Translations/en/ValidationErrors.xlf), but it doesn't seem to use any of my translations even when I copy the German translation into the /en folder.
TYPO3:
Form:
yamlPersistenceManager:
savePath: 'resource://vendor.package/Private/Form/'
presets:
default:
title: 'Default'
formElementTypes:
'TYPO3.Form:Base':
renderingOptions:
translationPackage: 'vendor.package'
I also added the defaultlocale to my sitewide settings.yaml:
TYPO3:
Flow:
i18n:
defaultLocale: 'de'
but still no effect. how do I translate my form error messages to German without using content dimensions?
I would update to Neos 2.1. Besides many improvements, you are able to have an uriSegment who is empty for default presets. In that way, you are able to have an german language content dimension without the 'de' in the url. Dmitri Pisarev did a great job on this: https://github.com/neos/neos-development-collection/pull/244
i am working on multi language site using typo3 6.2. where i am using typoscript in template to receive the language translation
the code to receive the language translation using typoscript is
temp.applyonline = TEXT
temp.applyonline {
data = LLL:EXT:ext_name/pi1/locallang.xml:direct_request
stdWrap.wrap = <div class="ceWrap"><br />|</div>
}
This code is working fine for normal languages but not for language dialect such as austrian german.
The dialect translation are working otherwise but the issues happens only when translation of dialect is trying to get via typoscript
Please help
In TYPO3 tx_news i have the more-link, but it only shows the default translation in every language.
My default language is Danish.
In items.html I have this:
<f:translate key="more-link"/>
In my TypoScript I have this
plugin.tx_news._LOCAL_LANG.de.more-link = mehr
plugin.tx_news._LOCAL_LANG.en.more-link = read more
plugin.tx_news._LOCAL_LANG.default.more-link = læs mere
I can also see these values in TypoScript Object Browser.
But on the English and the German page the link text is "læs mere".
What could be wrong?
Check your language settings in your setup TypoScript.
You should set for english:
config.language = en
and for german:
config.language = de
This configures the system “language key” to be used for the language.
This is used to select labels from XLF files. Setting this should make
frontend plugins respond by showing labels from the correct language
(requires installation of the corresponding translations).
Actually with the settings above you change in TypoScript the default values from a language file. As you see you are using there the de and en properties. This settings should be set correctly in your config also to enable TYPO3 to match them.
Documentation is here.