Dear Eduardo,
you are right, that the behaviour should be improved. Actually, one would need an additional option at portlet registration time to tell, whether the added page should be in a specified language (e.g. en), or that the language should be determined dynamically. There are as well some more shortcomings in the current dotlrn portal system (see below).
How to get connection locale specific text pages:
a) set in the package parameter of the community wiki use_conncetion_locale to 1 (you have that already)
b) In portal-element-add.tcl make the change below, which simply strips the language prefix from the page name used for resolving (the include or "resolve_request" do already the "right thing")
After this is done, you will see the pages.
However, the dotlrn portlets are defined in a way such that the title of the dortlrn portlet (pretty_name) is copied typically during registration time. Therefore, the title will be - without further work - always in one language, which is not nice, but might be sufficient for some use cases.
The easiest way out is to use in the xowiki page as title not a text page-title, but instead a language key (e.g. <span>#</span>xowiki.title_of_page1#). The approach with the message keys will work, but some new issues will pop up: (a) this is not nice from the xowiki point of view, (b) one would need a package for the community to provide a base for the message keys.
There is - up to a certain point - support in new-portal for computed titles, since the title of a portal element can be determined via service contract. However, the parameters are cached, and "GetPrettyName" does not get sufficient context to be useful.
I am not sure, whether it is worth to invest resources into this, since the xoportal approach presented in Guatemala does not suffer from these shortcomings.
For the time being, if you can live with single language title, or the message-key approach, the small change below should help you.
best regards
-gustaf neumann
--- admin/portal-element-add.tcl 27 Feb 2008 09:12:07 -0000 1.8
+++ admin/portal-element-add.tcl 31 Mar 2008 08:48:54 -0000
@@ -56,7 +56,8 @@
-package_key "xowiki-portlet"]
]
portal::set_element_param $element_id package_id $package_id
- portal::set_element_param $element_id page_name [$page_id name]
+ regexp {^..:(.*)$} $page_name _ page_name
+ portal::set_element_param $element_id page_name $page_name
}
ad_returnredirect $referer
}