[opencms-dev] Re: language file and modules

Jorg Heymans jh at coeno.com
Thu Jan 30 16:11:16 CET 2003


Hi Publius,

My experience with language files is that they need to be enclosed in an 
xml block that refers to the class (dots replaced by underscores) that 
uses it. Now you specified "<com_opencms_testmodule>" as the enclosing 
block, this should probably be set to the name of the class that 
generates this dropdown.

Alternatively, search for the Strings "administration" and "explorer" in 
the VFS, maybe you find where there are specified and which classes are 
referencing it. Sorry i can't be of more help, my experience of language 
files refers only to contentdefinition classes and backoffice classes.

Regards
Jorg Heymans


Publius Ismanescu wrote:

> Hi Jorg,
>
> I created a module following the instruction in the Documentation.
> In opencms , on the user interface there is a drop down list where the 
> user can select "Explorer","Administration" or "Tasks".
> When I created the new module I selected the checkbox "View" which 
> will add a new Item to the dropdown box so right now
> I have in that drop down "Explorer", "Administration", "Task" and 
> "?view?"
> In the documentation is mentioned that I need to create a language 
> file for this module which is module name followd by "_en"
> and to add a tag to that new language file:
>    I mentioned the file content bellow.
>
> Thank you again
> Publius
>
>
> Jorg Heymans wrote:
>
>> How do you reference the element in your template ?
>> What does your contentdefinition class look like ? I am unsure what 
>> you mean by "adding a new view to the view select box". Send us some 
>> more info so we can have a look.
>>
>> greetings
>> Jorg
>>
>> Publius Ismanescu wrote:
>>
>>> Hi Jorg,
>>>
>>> I did what you suggested but still doesn't work. Is shows as ?view?
>>>
>>> Thank you
>>>
>>>
>>>
>>> Jorg Heymans wrote:
>>>
>>>> Whenever making changes to the language files you need to
>>>> 1. publish your project
>>>> 2. restart tomcat
>>>>
>>>> Note : i don't know if 5.0rc1 changes this but in 4.7 it's required.
>>>>
>>>> Publius Ismanescu wrote:
>>>>
>>>>> Sorry for the mistake:
>>>>>
>>>>> the language file is :
>>>>> <?xml version="1.0"?>
>>>>> <LANGUAGE>
>>>>>         <name>English</name>
>>>>>         <com_opencms_testmodule>
>>>>>           <view>Edit View</view>
>>>>>        </com_opencms_testmodule>
>>>>> </LANGUAGE>
>>>>>
>>>>> Publius Ismanescu wrote:
>>>>>
>>>>>> Hi,
>>>>>> I'm using opencms rc1
>>>>>> I created a new module com.opencms.testmodule adding a new view 
>>>>>> to the view select box.
>>>>>> I followed the instruction in the documentation and I created a 
>>>>>> file com.opencms.testmodule_en for language inside the 
>>>>>> /com.opencms.testmodule/locales/en/ folder:
>>>>>>
>>>>>> my language file looks like this:
>>>>>> <?xml version="1.0"?>
>>>>>> <LANGUAGE>
>>>>>>         <name>English</name>
>>>>>>         <com_opencms_editmodule>
>>>>>>           <view>Testing  View</view>
>>>>>>        </com_opencms_editmodule>
>>>>>> </LANGUAGE>
>>>>>>
>>>>>> Inside the select view ,the new item is still  ?view?, it is not 
>>>>>> replaced.
>>>>>>
>>>>>> Please let me know what I'm doing wrong. The name of the tag is 
>>>>>> not correct ? The name of the file is not correct?....
>>>>>> I appreciate any help on this,
>>>>>>
>>>>>> Thank you
>>>>>> Publius
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>




More information about the opencms-dev mailing list