I am working on zf2 translation.I have added some fields in database,I added translated string for each field for each language.
But User can also add field.Suppose user is in English local and added A field in English language only,But later some user accessed the website and he or she knows Spanish,In this case for this user that field which previous user added should displayed in Spanish language.
So in this case how to manage dynamic field translation.Can any one help me for this issue.
Related
I have my site in both English and German. For my Extbase records, I configure all the fields with:
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly',
except those input and text fields which contain text that I want to translate. This works as expected at a lower (TCA) level: If I want to change any of the excluded fields I change it in the English (default) record and the change is also reflected in the German record.
But I have a big problem in the frontend, in the Controller Update actions: when I'm visiting my website in German, and I update a German record changing one of the excluded fields, this change is only done for the German record and doesn't get reflected in the English record. Moreover, if I then change anything in the record through the backend, this change I made to the German record's field gets overwritten by the English record's value and therefore lost.
Is there any way to solve this kind of situations in an idiomatic manner for TYPO3's Extbase?
Thanks a lot in advance!
I am new to rails.Currently i am working on a project in which i have three models wholesaler, application_template, and template fields.A wholesaler can create an application_template in which he/she specifies the application fields(by selecting data_type and typing field name)
application_fields form
that would be included in the application_template.
It is working perfectly, but the problem is now i want to store conditional inputs e.g wholesaler wants to specify a field which is required incase if applicant age > 40.
I have searched and go through different documentations but i could not found any solution to store these conditions in db. and then show conditional fields in application form . Can anyone please help me?
i am using pgsql as db
In one Modal Dialog form (dlg_closeopp.aspx) there's code as such:
<%# Register TagPrefix="loc" Namespace="Microsoft.Crm.Application.Controls.Localization" Assembly="Microsoft.Crm.Application.Components.Application" %>
<loc:Text ResourceId="Web.SFA.opps.dlg_closeopp.aspx_176" runat="server"/>
And when I run this in web browser I see this text at this place "Status". So this is localization resource but I have no idea where it comes from.
What is _176 a line number? Adress?
I want to make a localization as such for my custom Modal dialog.
(My question is in bold).
So this is localization resource but I have no idea where it comes
from
Short Answer: Language Packs.
Long Answer:
CRM can be localized by using Language Packs, for all the available language packs, out of the box attributes translations are shipped from Microsoft. If you have custom attributes on an entity you want to translate, you need to Export/Import translations.
Create a solution with the entity and the attributes you want to localize. Export the "Translations" out, unzip the file and edit "Crm Translations" using excel file, look for the "Display Strings/Localized Labels" tabs in the excel. Once you have updated your translations, re-zip the file and import into CRM.
What is _176 a line number? Adress?
They are just display string keys used by CRM internally to store key value pairs of translated text. You can find them in the "Display Strings" tab in the "Crm Translations" excel sheet. If you want to use a field's label as a localized string, you'd reference the "Display String Key" like in example you have provided.
We recently upgraded our Kentico 8.2 instance to 9.0 and are now focusing on localizing our site into two additional cultures. The textual content of our site is primarily stored in one of three places:
Editable regions
Text fields in custom page types
Custom tables
We're using the Kentico EMS license and would like to leverage the built-in Translation Services app in order to translate content in each of these locations, however it appears that it only supports with content within editable regions. I know Kentico has an input control for translating text boxes but it forces the content editor to create a distinct resource key for it; we simply have so much content I'm concerned this will get out of control for editors.
Additionally, we had considered migrating some of our content into pages but they don't logically fit there, and there are some complex relationships that would cause duplicate content so I'd really prefer to keep the content where it is. The other thought I had was to build either a custom module or custom form control to do some dirty work under the covers but didn't want to reinvent the wheel if there was already a known approach.
Is there a Kentico recommended approach, or workaround, to managing content translations within custom tables and page type fields?
You can use Translation in Kentico to translate page type fields and send them for translation. Check this documentation page for an example. It can be more complex at first, but it should do the trick for you. I have just tested creating a simple translation request for my page type and the resulting XLF file contained all page type fields.
For custom tables I will have to dissapoint you because custom tables in Kentico are not culture specific. If performance is important for you the best way to create translations is to add CultureCode field to your table in order to specify which culture the item is for.
For example you can have table with columns: ItemID, Text, CultureCode
And then the data would look like:
1, Dog, en-US
2, Hund, ge-GE
3, Pes, cs-CZ
If you would want to go even step further I would recommend to create this not as a custom table, but as a Custom class which will sit inside a custom module for which you can create your own interface which would allow editors to easily create all culture versions for the items.
For the custom page types and custom tables, you can change those text fields to localized text fields at the field definition and it will allow you to enter different values per language without a resource key. This is the best route IMHO for page types and custom table translation. Although this still does not allow for "automatic" or built-in translation.
I am not sure what do you mean by content translation in page type fields - there is support for translating page type fields. You can find example on sample site in Kentico installation. (The site is called DancingGoat - see image example for page type field localization in english and spanish language).
I am developing one MVC4 application, in that there is option for language seletion in my application & based on that selected lanaguage, all label & messages are displayed.In this application i have put one required field validation of MVC, and it will display validation message in english only.I have created two different xml file for Localization in my application folder i.e Resource.resx for english lanaguage & Resource.de-DE.resx for German langauge. I have used the following code in my Model class :
[Required(ErrorMessageResourceType = (typeof(MyFolder.MyResource.Resource)), ErrorMessageResourceName= "FromDateRequiredMessage")]
[Display(Name = "FromDate", ResourceType = typeof(MyFolder.MyResource.Resource))]
public DateTime FromDate { get; set; }
So here i have Resource.resx xml file and in that i have Key is 'FromDateRequiredMessage' which is same key as in Resource.de-DE.resx german file but different value.Also i have make the follwing changes in my in web.config file for globalization :
<globalization enableClientBasedCulture="true" culture="auto" uiCulture="auto"/>
So, i want that when i select the german language from my application, then it should show me validation error in german language.But here it will show me validation message in english only.
So, now what can i do for this? Please hel me.
Please use method Application_PreRequestHandlerExecute() in your application's Global.asax file. This method will execute before any page request or its validation.
Also set the current culture value in this method.
Simple answer > nothing is wrong!
when you put culture=auto in web.config it works this way, your application will look at the header of the incoming request and look for accept languages and the order of them, so in one request in it you have something like En - Fa ... the application will select the first one and set culture an ui culture to that, so go to your browser language settings and change the order of the languages to test your application.
In order to be able to do this you will need to set the culture. So will provide the user with selection in dropdown etc which they explicity select German,English etc, this will change yoursite to be yoursite/En or yoursight/Gr etc. This article explains in well and gives sample code. http://www.codeproject.com/Articles/207602/Creating-a-Bilingual-ASP-NET-MVC3-Application-Part the part "Adding UI support to switch languages" has what you need i believe.