Managing common micro content

Topics: Localization
Jul 31, 2011 at 7:23 AM

Is it already possible to manage and create common used text fields like "Read more".

offcource it can be a field which is part of a content type but the problem is that if you have for example 10000 pages and you want to change the text you have to edit them all. An other option is to create widgets but that's very hard to manage if you have many text fields in combination with multiple layouts and languages. In other CMS systems i've seen they used separate solution (managable within the backend) for this called Dictionary Items so something similar as Resources in ASP.net but managable in the CMS backend.

Jul 31, 2011 at 9:27 AM

I think the best way to achieve what you asked about, by building a Content-Part, and attach it to any Content-Type you want to add this functionality to. Also you must use localizable strings (T("Read more")) in building that Content-Part to be ASP.NET Resources-like strings, then build the translation *.po files for the module you are building to allow the localized strings to be translated.

Jul 31, 2011 at 11:41 AM
Edited Jul 31, 2011 at 11:48 AM

ok thanks you. I've read about po files but the problem with po files is that there's no way to manage them in de backend. So when a customer wants to change a text they have to call me and i have to type that hardcoded in the po files.

Also: I generated a po files with the command but unfortunaly the following translation is not automatic included in the po file for my module:

<p>@T("more")</p>

Am i doing something wrong?

 

Jul 31, 2011 at 12:15 PM

I think to allow users translate through admin pages, you must build a module for that. So that module will read and edit .po files and change any corresponding db records.

I'm waiting for that module as you, and I may build it, and contribute it to the community gallery, when I need it urgently.

Jul 31, 2011 at 12:37 PM

Ok cool! I think that is one of the most important features for content managers which is missing.

1 problem still remains. When i run the following command:

extract default translation /Extensions:Orchard.Blogs /Output:c:\temp

The po file only contains the strings from the /Module.txt and not the other translations within the module itself.

 

 

Jul 31, 2011 at 12:52 PM
Znowman wrote:

Ok cool! I think that is one of the most important features for content managers which is missing.

1 problem still remains. When i run the following command:

extract default translation /Extensions:Orchard.Blogs /Output:c:\temp

The po file only contains the strings from the /Module.txt and not the other translations within the module itself.

 

 

Waiting for answer...

I think it is a bug in the translation commands module. Still waiting for another answer.

Coordinator
Aug 3, 2011 at 1:22 AM

That's weird. Why do you need to extract the po files?

Aug 3, 2011 at 9:51 AM

Because i want to translate the T text values. Maybe is has something todo with the way i setup my project. Earlier i created myself a visual studio solution and it gave me all weird errors. Now i've use the source with solution file included and many errors are gone so maybe this is fixed by using the source. I'll check soon.

Coordinator
Aug 4, 2011 at 12:44 AM

But you don't need to extract the strings yourself in order to translate. Did you read http://orchardproject.net/docs/Creating-global-ready-applications.ashx? What language do you wantto translate to?

Aug 4, 2011 at 7:22 AM

I've want to translate text fields which i declared in my custom modules and theme (by T("TextField"). These are Dutch and English and maybe in the future other languages. I've read that tutorial and in section "Contributing files for third party modules" they explain what i'm trying to do here i think.

Coordinator
Aug 4, 2011 at 7:36 AM

Ah ok, that wasn't immediately clear as you were mentioning Orchard.Blogs. I would probably need a copy of the code to debug this.