hope someone has a idea.
I run into a challenge on a multi language typo3 site.
The default language is english and there are two spanish languages. Now, after I've translates the first spanish, I would like to copy this to the second one.
So basicly I would like to say "Copy spanish #1 content element", instead of "Copy default content element"
In TYPO3 4.5 there was a quite nice extension "fl_langtranslate", but this not gonna work anymore in > 6.0.
Anyone have I idea or solution for that? I am wondering that TYPO3 is not gonna do this out of the box.
Cheers!
If you run into this issue quite often, I'd suggest to think about a language-fallback.
Using TypoScript, you can define which language to fall back if your translation isn't available.
Here's an example:
Here's an example for English (en) as 0, Spanish (es) as 1 and Mexican Spanish (es-MX) as 2.
# Don't fall back to another language. If it's not translated, the user has to switch the language.
sys_language_mode = strict
# english language
sys_language_uid = 0
[globalVar = GP:L = 1]
config.sys_language_uid = 1
[global]
[globalVar = GP:L = 2]
config.sys_language_uid = 2
# Try es-MX first and if not available, try es-ES. If that's not available, too, this page is not translated.
sys_language_mode = content_fallback ; 2,1
[global]
You could also create a 3rd language and call it Spain Spanish (es-ES) and use it for content that's just for people living in Spain and just never use the id 1 for creating links - just for content-translation ;)
The most extensions does not work in 6.0 because of some API-functions which has been changed. So perhaps check your PHP-Errorlog. Usually it is easy to replace the API-function. There is t3lib_div::int_from_ver noted at http://wiki.typo3.org/TYPO3_6.0_Incompatible_Extensions_F
use t3lib_utility_Version::convertVersionNumberToInteger() instead.
In TYPO3 version 7.5 this feature is implemented, you can choose in a selectbox near the button "Copy default content elements" from which language you want to copy the content elements.
Ext. fl_langtranslate now should work with TYPO3 6.2 but has a bug, if you removed the prefix "Translate to..." (if the "l10n_mode" is not "prefixLangtitle"):
$GLOBALS['TCA']['tt_content']['columns']['header']['l10n_mode'] = '';
Related
enter link description here
I wonder why SOURCE_LOCALE is in call caption and reason why it has underscore between them. I want to know what they are and how they work.
It is common to define constant values using all capitals. It is just a way to highlight a value that isn't intended to change. While Lua doesn't have technically have constants, this practice still shows up. Also, underscores can be used in variable names.
And if you read further into the article, you'll see that the SOURCE_LOCALE is used alongside the LocalizationService :
function AnimateUI.loadTranslator()
pcall(function()
translator = LocalizationService:GetTranslatorForPlayerAsync(Players.LocalPlayer)
end)
if not translator then
pcall(function()
translator = LocalizationService:GetTranslatorForLocaleAsync(SOURCE_LOCALE)
end)
end
end
And there is a note that follows :
If your game's source language is not English, change the locale code on line 4 (en) to match the game's source language setting in the localization portal.
The point of this code is to automatically translate your message into different languages. en is used to define the English locale. Other language locales include es for Spanish, de for German, and a number of others.
If you want more information, consider reading the articles and tutorials on localization.
I am trying to send the message through com port using MScom in VB6. although simple message in english is sending is ok. But when I send the urdu language test then it send? marks. my port setting
With MSComm1
.CommPort = port
.Settings = "9600,N,8,1"
.Handshaking = comRTS
.RTSEnable = True
.DTREnable = True
.RThreshold = 1
.SThreshold = 1
.InputMode = comInputModeBinary 'comInputModeText
.InputLen = 0
.PortOpen = True 'must be the last
End With
I use urdutextbox for writing message
Basically, I underwent through the same processes below in trying to develop a multilingual VB6 app in Chinese, German, Japanese and Dutch and was successful so I'll share it with you except it will be for Urdu language.
Firstly, you will need to install the Hindi/Urdu Language Pack for Microsoft Windows to add that language to your Windows OS. Test that this is successfully installed by changing the Language settings so that you can see some Urdu text displayed in your system screens and that you can cut and paste Urdu in VB6 instead of it showing the question marks.
Make sure you are using Unicode type strings.
If you are using Access, make sure you can successfully store Urdu text in the database tables which should be showing Urdu text instead of the ??? (I did also get the ??? until I installed the Windows Language Packs for the languages concerned and used Unicode).
If you are using VB6 textboxes, make sure that Fonts are Unicode. Test that it can display the Urdu text.
Hungarian characters aren't displayed correctly when used in translations within sr_feuser_register. The characters are displayed correctly when used in regular content elements.
sr_feuser_register: 4.0.2
TYPO3: 6.2
PHP 5.6
MySQL 5.5
The website is a single tree, multilanguage site, languages are assigend to domains.
Here is the TS Setup for Hungarian language, other languages have been setup the same way:
[globalVar = GP:L = 15]
config.sys_language_uid = 15
config.language = hu
config.htmlTag_langKey = hu
config.locale_all = hu_HU.utf8
[global]
sr_feuser_register translations are defined through Typoscript the following way:
plugin.tx_srfeuserregister._LOCAL_LANG.hu {
username = Felhasználónév
...
}
When viewed in fronted, the sepcial characters are displayed incorrect. Output is something like: FelhasznĂĄlĂłnĂŠv
Same procedure works fine in other languages. Special characters are displayed correctly when viewing Chinese, German or Russian translation. Characters are stored correctly in the database (utf8_general_ci). Even more strange, when I use the characters in the same Typoscript for a language like french, the charachters are displayed correctly on the french frontend.
Example for french configuration in the same Typoscript Setup Template.
plugin.tx_srfeuserregister._LOCAL_LANG.fr {
username = Felhasználónév
...
}
All characters appear correct in french frontend. I have no idea at which point the characters get messed up and why the characters are displayed correctly when used in other languages.
Looks very strange indeed, I do not have a proper solution to provide, but are you able to debug the extension's core?
Could you try to modify these lines and see what happens?
https://github.com/TYPO3-extensions/sr_feuser_register/blob/162bad24641ea809297f0ef8aa787f1dee281385/Classes/View/Marker.php#L479
Hmm... first it looks for me that the metaCharset (https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#metacharset) is not set to utf-8.
Please check that.
Also check if the collation of your database it correct set to utf-8.
Are german umlauts like äöü correct displayed?
Hey Guys is it possible to use an Regex with typoscript??
I exactly need it at the baseURL.
f.e. baseURL = http://example.com/ remove last slash (http://example.com)
Thanks in advance!!
You could do it with stdWrap.substring if config.baseURL has stdWrap. But it has not. And you should not remove the last slash at config.baseURL.
If you have stdWrap, you can use substring
10 = TEXT
10.value = http://example.com/
10.stdWrap.substring = 0,-1
Replacement via regular expression is implementent since TYPO3 4.6 see TSref
I am using Lucene Search.
I have uploaded a French file (french.txt) with the following content.
multimédia francophone pour l'enseignement du français langue étrangère
If I search for francophone then it shows the file in the search result. But when I search for multimédia or français or étrangère, it does not show any results.
I have tried to use org.apache.lucene.analysis.fr.FrenchAnalyzer, but it is still not working.
How can we search French words such as those above?
Do you use a ISOLatin1AccentFilterFactory in the analyzers for the field where this text is indexed? Make sure that if you have it for the index analyzer, you also have it for the query analyzer.
BTW. If you are using ISOLatin1AccentFilter note that it was deprecated in favor of ASCIIFoldingFilter
Basically, you have 2 options:
Index and search your French files with Snowball analyzer for French
Index your French docs as usual, but search with FuzzyQuery (not very accurate, but may be enough in your particular case).