I am not sure why language translation is not working for me. $ uname -a Linux delora 2.6.24-23-386 #1 Thu Nov 27 18:10:58 UTC 2008 i686 GNU/Linux
Erlang Web 1.2.1 Firefox 3.0.7 ----------------- To check that my browser language setting is working I do this: point browser to wiki page http://wiki.erlang-web.org/I18n I set my browser language to either english or spanish and the Example box titles change to my chosen language as expected, e.g. in 'html embedding' box. Now, for my test ... I add <wpart:lang key="greet"/> to the welcome.html page on my installation of erlangweb-1.2.1 and configure project.conf, en.conf, and es.conf as follows: config/project.conf --- {http_port, 8080}. {language_files, [{'es-es', "config/languages/es.conf"}, {es, "config/languages/es.conf"}, {en, "config/languages/en.conf"}]}. config/languages/en.conf --- {"greet", "hello"}. config/languages/es.conf --- {"greet", "hola"}. Then start erlangweb and check ets tables ... $ cd erlangweb-1.2.1 $ bin/start_interactive yaws <snip startup info /> 1> ets:match(e_languages, '$1'). [[{{es,"greet"},"hola"}], [{{'es-es',"greet"},"hola"}], [{{en,"greet"},"hello"}]] 2> ets:match(e_conf, '$1'). [[{template_root,"templates"}], [{language_files,[{'es-es',"config/languages/es.conf"}, {es,"config/languages/es.conf"}, {en,"config/languages/en.conf"}]}], [{http_port,8080}]] 3> When I access welcome.html page it always says hello even if I set browser language to Spanish, es. So, it appears that the wpart:lang tag is being read, but the browser language choice is not getting recognized. I thought the browser language choice was supposed to trigger the wpart:lang language lookup. I also tried setting the language in e_dict ... 3> ets:insert(e_dict, {lang, es}). 4) ets:insert(e_dict, {language, es}). 5> ets:match(e_dict, '$1'). [[{language,es}],[{lang,es}]] 6> but it made no difference - hello on the welcome.html page, not hola. I have found no errors in log/report.log or during start, and you can see the languages configuration above. The 'es-es' setting is because at first I tried Spanish [es-es] for my language then switched to Spanish [es] in the browser. Does anyone have suggestions of what to try next ? -- Michael McDaniel Portland, Oregon, USA http://autosys.us http://mmcdaniel.com/erlview ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Erlangweb-users mailing list Erlangweb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/erlangweb-users http://www.erlang-web.org/