Not apply .po files for module in Orchard CMS - localization

I install Orchard CMS 1.10 and take russian translate from https://crowdin.com/project/orchard-cms and unpack to Orchard.Web. When i added and enabled ru-Ru localization all work good for razor views. But for module isn't. For example i try change validate message for required fields in Orchard.DynamicForms, but nothing happened when displayed validation message, they still english. Also translate not applied for module list in admin panel.

Search for the english message in source code, add breakpoint and step into the T() call, then check the value of the scope parameter. This is the value that should be used in the msgctext line.

Related

ASP.NET MVC add translation in multiplanguage from screen/UI dynamically

In my website -- Add screen/UI from which user can add translation dynamically
for example:
I want to add translation for "Hello World!" in multiple language and want to fetch according to language selection
Key :
strHelloWorld
Value:
Hello World!
Language:
en (it can be anything english,spanish,german etc)
This above 3 field data we can add/enter from Scree/UI by superadmin and
store/save in whatever form is good it can be in database or in json file
Please suggest way to add translation from screen
Asp.Net has a special file called resource files (.resx) to define the default locale (English) and other language texts.
For that please follow the steps:
step 1: You need to create .resx(resource file) into Resource(new
folder). create the file for the default language and second file with other lang.
step 2: set access modifier to public otherwise the
variable value will not appear on the view side
step 3: enter the variable name in the same in both files but make value different related to language.
step 4: once you declare the same variable name in both languages resource file, you can use that variable name where ever you want to declare in .cshtml file.
ex. Resources.Global.APP_NAME
For reference :
http://www.codedigest.com/posts/53/create-multi-language-website-in-aspnet-mvc---localization
Please use below nuget package
It is really awesome thanks to nuget and their author
https://github.com/RickStrahl/Westwind.Globalization
Please note that In this solution they have provided solution for all .net framwork/platform like asp.net 4.5 also aspnet core
Thanks again

30Bees/Presta 1.6 shop translation in frontController

I am trying to add a few translations to the frontend of our module. When the translations are in the .tpl files they do get rendered. However no translation fields get shown in the backend my code for the .tpl files is:
{l s="Text" mod="myModule"}
I also do need to do some translating in the FrontControllers (mainly Error handling and feedback for serverside validation).
In the AdminController I simply use $this->l('Text'); which works. However, in the FrontController this is not available. I've checked the ControllerCore and FrontControllerCore, l() is not defined in those and only available in AdminController.
Can anyone give me a detailed explanation of what I need doing? All my research on the web always points to $this->l() being the thing to use...
When using translations in tpl files you need to use single quotes not double quotes.
{l s='Text' mod='myModule'}
As for front controllers... well if you're using custom module controllers as in controllers that extend ModuleFrontController you can use
$this->module->l('Text');
And if you're not using those controllers then... start using them.
Some things might be different since thirtybees is a fork of PrestaShop but I guess translation mechanism is the same.

composite C1 form Renderer localization

I have created a global data type, and use form renderer in a page to let user fill in the data and submit to website.
The default English is working fine.
now when I try to support the second language I run into issues. According to the composite documentation:
1.Add your empty localization file at ~/Frontend/CompositeForms/Renderer/Localization/, for example: Composite.FormsRenderer.de-de.xml
2.Copy the contents of the default Composite.FormsRenderer.en-us.xml to your localization file.
3.Translate the strings.
4.In ~/App_Data/Composite/Composite.config, under the section locate Composite.Plugins.FormsRenderer's add section and register your localization file
but ~/Frontend/CompositeForms/Renderer/Localization does not exist, and neither does Composite.FormsRendereren-us.xml exists.
is the documentation outdated? does anyone had experience with localizing form renderer on user defined data type?
thanks
The documentation IS outdated at the moment (and will be updated soon - thanks for pointing it out).
Do it in the following way on 4.0 or later:
Make a copy of ~/Composite/InstalledPackages/localization/Composite.Forms.Renderer.en-us.xml, changing the language/culture code from 'en-us' to your language's (e.g. Composite.Forms.Renderer.de-de.xml).
Translate the strings.
No need to change anything in ~/App_Data/Composite/Composite.config any more.

Orchard Contrib.DateTimeField missing style and script

`I've installed the DateTime Field module to Orchard and assigned two fields to my custom part, but when navigating to the Admin Edit page for the custom type implimenting the custom part, I recieve an error like this:
A 'stylesheet' named 'jQueryUtils_TimePicker' could not be found.
When looking in the Contrib.DateTime.cshtml View, I find that the following two resources are required, but I can't find them in the jQuery module's resource manifest.
Style: jQueryUtils_TimePicker
Script: jQueryUtils_TimePicker
Where are these meant to be defined and stored?
Thanks in advance.
P.S.
If I change both to jQueryUI_TimePicker (for which there is a script and style defined in the jquery module resource manifest), then it doesn't throws an error, but the time picker doesn't work.
Contrib.DateTimeField is obsolete since 1.4 so you shouldn't use it.
The DateTimeField has been integrated in Orchard.Fields has a core feature.

Setting up localization in Kohana 3.0 framework with set_locale

In a tutorial on setting up internationalization and localization, "Kohana 2.4 I18N (internationalization and localization) Library" the author says:
I'd put it in a Base Controller so that all Controllers inherit it.
This is the code:
I18n::set_locale('tl_PH');
I tried placing it in all the controller and places I could but is not working.
Where is the exact place in Kohana 3.0.4.2 that I should place it?
Put this line in bootstrap.php:
I18n::lang('tl-PH');
The I18n::set_locale function doesn't exist in Kohana 3. See I18n class docs.
Not sure who wrote that article, but locale should be set using the config locale.php config file. You may have to copy it from system/config/locale.php into your application/config/locale.php and set the proper values.
Calling I18n::set_locale() should only happen if you need to change from the default (set in locale.php) to something different (like Dutch, English, etc...).
P.S I'm a Kohana 2.4 core dev...
If you want to set the PHP locale, you will change this is in application/bootstrap.php, there is a setlocale(LC_ALL, 'en_US.utf-8') line there already which you can change to the correct language.
To set Kohana's internal language for translation, add a call to I18n::lang('en-us') (replace "en-us" with your language) after the Kohana::init() call, before Route::set().

Resources