TYPO3 alternative page language configuration - localization

I'm trying to join a bunch of pages that are in different languages to a single page whith multiple alternative page languages.
This way, instead of having 3 Home pages, each one with its own language, I have 1 with several alternative page languages. So I'll have one page but the content is in different languages, depending on the language record it uses.
The issue is that TYPO3 extensions should behave differently depending on the language, i.e: form fields should be translated.
For that I was thinking on having a local storage folder for each page language record in order to hold the extension configurations. Chinese language would have a separated storage folder from the english version and the extension running for the chinese version would use the correct storage folder.
But how can I specify which storage folder the extension in the chinese language record should use if I don't use a new page?
Because if I use a language record to differentiate chinese from english I can't have different typoscript configurations. The language record properties page doesn't have a ts config field and as such I can't tell that the extension should use a different storage folder (different pid) for this language.

For each language you can add a cObj plugin and thus edit the plugin configuration. You can also use a condition and getText to assign a new pid to the plugin. For example plugin.test_pi1.sysfolder < 666.
The first option is when you look in the mysql table language overlay you have a separate record ctype plugin of your plugin and thus you can edit the plugin configuration.

Related

How to switch resource files in asp.net mvc based on db data?

For example if i have a languages table in the db, which contains culture id (LCID) and short name of a language, then in my view i have a dropdown where user can select either english language or french language. I have 2 Resource files in GlobalResources folder Resources.resx and Resources.fr.resx. Where english language is main.
Where i am stuck, is switching of languages itself, because i need a way to make a "connection" between Resource.resx and Resource.fr.resx files with cultureId or short language name from DB.
If it were possible to attach a cultureId (LCID) to a resource file it would be great, because then i just had to choose the file with the right LCID, but it doesnt seems possible.
I could ofcourse look for the Resource file with the "correct" short name and just pick it, but it seems like there should be better solutions.

handle translation of website

I finished my website and want to translate it in 3 other languages.
The question is not how to translate it, but how to handle the different languages, when you don't use a CMS.
I have all my script with English text in it.
I'm able to translate it in Dutch, French and German, so I'll have 3 folders: 1 folder for each language.
The problem is when I wan't to upgrade the website:
If I change code from the English folder, I'd like to juste copy-and-paste this code for the 3 other languages.
Problem is that I will always have to retranslate it to 3 other languages again.
How do big websites handle translation?
Having multiple folders, with every folder = 1 language, is the way to proceed?
Text coming from database is a better solution? With a table for each language?
Make a function with the parameters: string code, language
So for example:
translate('error_1','de_DE');
that "would" return an specified error in German.
So you could create 3 .csv files with all the strings you would need.
And having multiple folders is rubbish.
On the bis pages it just seems as they use different folders but the "folder" is handled via. .htaccess and is changed to i.e. index.php?page=main&language=de_DE

Localization in tx_news extension TYPO3 6

I'm using News System Extension 2.1 for my website. My TYPO3 version is 6.1.
The language key taken by tx_news is default, I would like to change the key to dk or nl or something. I changed the local language of TYPO3 using this:
config.locale_all = nl_NL
This solves the problem while displaying List of news, but when I try to display a Date Menu, it takes the default to English.
Maybe because the ViewHelpers I used for displaying List is default FLUID and the ViewHelpers used for displaying Date Menu are something else(They use translate key. Default View which comes with tx_news)
How do I change the language of tx_news to the language I desired to?
config.locale_all is basically used to change format of dates (more info on http://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html)
In order to get localized labels, you need:
To download localization packages in Backend using the Language module
To set up your website with the language you want, using config.language (and possibly config.sys_language_uid if your website is going to be multilingual, then you would have to create sys_language records at root as well)
Please have a look at the frontend localization guide:
http://docs.typo3.org/typo3cms/FrontendLocalizationGuide/

Localizing HTML files / Parallel file editing

Due to timing constrains, I have developed a web application where a lot of language-specific strings have been directly hard-coded to large HTML/Javascript static files. Due to poor coding, code and content have not been properly separated.
To achieve quick and dirty localization, I am looking for some kind of text editor that would allow to "tag" the local elements of a file and turn them into "custom fields". These fields could then be stored in some resource file and translated independently from the shared structure, to generate multiple localized versions of the file.
I realize that I could do this myself through a "simple" templating mechanism, for instance by keeping a shared root file containing fields like {%welcome_message%} and a csv file for field translations, and then generate localized files.
But is there a text editor that could do this in a fast, user-friendly way ? For instance where we could see/modify the custom field values (as well as the root parts) directly when editing a file ?
What would be great for instance, would a a text editor feature/plugin allowing some kind of parallel file editing by distinguishing "root" and "localized" parts in a set of files.
(Note : currently I am using diff/merge tools to achieve this kind of results, but it will become increasingly cumbersome as we add more languages).
I think this could help you in parallel file editing http://www.sublimetext.com/.

Dynamic localization files blackberry

Here's the scenario I have. I'm working on a multi-lang application but the available languages are dynamic and returned by an API from the server. After selecting a language I should download the localization file that contains the key/value pairs to use it in my application.
My question is, does the BlackBerry localization system allow such behavior? I mean can the key/value localization files be added to the application dynamically or they have to be bundled in my COD?
If that scenario doesn't work, I would appreciate suggestions on how to do this.
The default resource files used to localize an application must be bundled with the application.
Instead you could use Locale.getDefaultForSystem() to return the current locale in use and based on that load the correct language from your remote source.

Resources