Thread: [Cppcms-users] localization problem
Brought to you by:
artyom-beilis
From: sergey l. <ccp...@gm...> - 2012-03-22 11:39:52
|
Dear All! cppcms: 1.0.0 os: windows 7 x86_64 compiler: VS2010 I have strange problem with localization in skin and there is no problem If I call translate from controller. In controller I have: context().locale("ru_RU.UTF-8"); render("skin", "test", content); response().out() << "test: "<< translate("test"); In locale\ru\LC_MESSAGES\test.po I have: msgid "" msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "test" msgstr "ТЕСТ" In skin I have: <% gt "test" %> and cppcms_tmpl_cc produce code: #line 116 "skin.tmpl" out()<<cppcms::locale::translate("test"); I get untranslated skin's string and I get translated controller's string in browser output. Thanks in advance! |
From: sergey l. <ccp...@gm...> - 2012-03-22 13:12:54
|
I think the main reason why skin's string not translated because of cppcms_tmpl_cc translate skin code to cppcms::locale::translate and locale structures in cppcms::locale not initialized but context().locale function. In controller I use cppcms::application::translate that proper initizalized by context().locale call. So can someone help me how to proper using localization from skin/view? Thanks in advance! On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...>wrote: > Dear All! > > cppcms: 1.0.0 > os: windows 7 x86_64 > compiler: VS2010 > > I have strange problem with localization in skin and there is no problem > If I call translate from controller. > > In controller I have: > context().locale("ru_RU.UTF-8"); > render("skin", "test", content); > response().out() << "test: "<< translate("test"); > > In locale\ru\LC_MESSAGES\test.po I have: > msgid "" > msgstr "" > "Content-Type: text/plain; charset=utf-8\n" > "Content-Transfer-Encoding: 8bit\n" > msgid "test" > msgstr "ТЕСТ" > > In skin I have: <% gt "test" %> and cppcms_tmpl_cc produce code: > #line 116 "skin.tmpl" > out()<<cppcms::locale::translate("test"); > > I get untranslated skin's string and I get translated controller's string > in browser output. > > Thanks in advance! > > |
From: Artyom B. <art...@ya...> - 2012-03-25 14:55:05
|
Do you use any cppcms_tmpl_cc flags like -d domain? Basically it seems strange. > >On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> wrote: > >Dear All! >> >> >> >>In controller I have: >>context().locale("ru_RU.UTF-8"); >>render("skin", "test", content); >>response().out() << "test: "<< translate("test"); >> >> Both should work. response().out() should have a proper locale. Artyom |
From: sergey l. <ccp...@gm...> - 2012-03-25 18:00:57
|
Hello Artyom! I tried use -d flag as described in wiki http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. I also tried using cppcms version 1.0.1 and 0.999.0 but have the same result. So I get stuck with it and haven't any ideas. On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> wrote: > Do you use any cppcms_tmpl_cc flags like -d domain? > Basically it seems strange. > > > > > > >On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> > wrote: > > > >Dear All! > >> > >> > >> > >>In controller I have: > >>context().locale("ru_RU.UTF-8"); > >>render("skin", "test", content); > >>response().out() << "test: "<< translate("test"); > >> > >> > > > Both should work. response().out() should have a proper locale. > > Artyom > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-03-25 19:13:06
|
Can you create a sample program and send it? Because both methods should work (without -d flag) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: sergey lavrov <ccp...@gm...> >To: cpp...@li... >Sent: Sunday, March 25, 2012 8:00 PM >Subject: Re: [Cppcms-users] localization problem > > >Hello Artyom! > > >I tried use -d flag as described in wiki http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. >I also tried using cppcms version 1.0.1 and 0.999.0 but have the same result. >So I get stuck with it and haven't any ideas. > > >On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> wrote: > >Do you use any cppcms_tmpl_cc flags like -d domain? >>Basically it seems strange. >> >> >> >> >>> >>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> wrote: >>> >>>Dear All! >>>> >>>> >>>> >> >>>>In controller I have: >>>>context().locale("ru_RU.UTF-8"); >>>>render("skin", "test", content); >>>>response().out() << "test: "<< translate("test"); >>>> >>>> >> >> >>Both should work. response().out() should have a proper locale. >> >>Artyom >> >>------------------------------------------------------------------------------ >>This SF email is sponsosred by: >>Try Windows Azure free for 90 days Click Here >>http://p.sf.net/sfu/sfd2d-msazure >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >This SF email is sponsosred by: >Try Windows Azure free for 90 days Click Here >http://p.sf.net/sfu/sfd2d-msazure >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: sergey l. <ccp...@gm...> - 2012-03-26 08:12:27
|
Hello Artyom! I sent to your email VS project that reproduce such behavior. On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> wrote: > Can you create a sample program and send it? > > Because both methods should work (without -d flag) > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* sergey lavrov <ccp...@gm...> > *To:* cpp...@li... > *Sent:* Sunday, March 25, 2012 8:00 PM > *Subject:* Re: [Cppcms-users] localization problem > > Hello Artyom! > > I tried use -d flag as described in wiki > http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but > unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. > I also tried using cppcms version 1.0.1 and 0.999.0 but have the same > result. > So I get stuck with it and haven't any ideas. > > On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...>wrote: > > Do you use any cppcms_tmpl_cc flags like -d domain? > Basically it seems strange. > > > > > > >On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> > wrote: > > > >Dear All! > >> > >> > >> > >>In controller I have: > >>context().locale("ru_RU.UTF-8"); > >>render("skin", "test", content); > >>response().out() << "test: "<< translate("test"); > >> > >> > > > Both should work. response().out() should have a proper locale. > > Artyom > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2012-03-26 09:08:37
|
>Hello Artyom! > > >I sent to your email VS project that reproduce such behavior. > Small additional note: why do you use dllmain.cpp? You don't need one everything you need for the dll is included in the generated cpp file. Artyom |
From: Artyom B. <art...@ya...> - 2012-03-26 08:59:03
|
Ok, I see.... (Argggrrr Windows ... ) I compiled the code g++ -Wall -DDLL_EXPORT=1 test.cpp -lcppcms -lbooster -o test.exe g++ -Wall -DDLL_EXPORT=1 -shared test_skin2.cpp -lcppcms -lbooster -o cygtest_skin.dll And it works perfectly well :-) I looked into the project files and found following dependencies: Z:\libraries\cppcms\cppcms-1.0.0\build\Debug\cppcms.lib Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\booster.lib Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\libbooster.lib cppcms.lib - is import library for cppcms.dll booster.lib - is import library for booster.dll libbooster.lib - is STATIC booster library. I assume there is a mixup of some symbols. I assume what happens is that main program and the dll use two different versions of symbols that is why the localization facets installed in main program are not visible in DLL. Two things: 1. When you use dynamically loaded view you **must** use DLLs 2. It is good idea to add DLL_EXPORT define to your projects (so you'll get correct import symbols 3. You should always link with cppcms.lib and booster.lib unless you create fully statically linked projects. Once you clean all the dependencies as required it would work. Additional small notes. Did you build cppcms with nmake files or with MSVC project? According to the layout it looks like you created it with MSVC project instead of nmake. VS projects are not supported. Please build cppcms in release and debug mode indepenently using CMake + NMake. The reason that there are different configurations for debug and release that can't be done using VS project. For example in debug it should be cppcmsd.dll and boosterd.dll cppcmsd.lib and boosterd.lib. It seems that your debug build uses "release" file names. It may lead to the same mixup as well. Best Regards, Artyom Beilis ------------- Support CppCMS by donating money: https://sourceforge.net/donate/index.php?group_id=209965 >________________________________ > From: sergey lavrov <ccp...@gm...> >To: cpp...@li... >Sent: Monday, March 26, 2012 10:12 AM >Subject: Re: [Cppcms-users] localization problem > > >Hello Artyom! > > >I sent to your email VS project that reproduce such behavior. > > >On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> wrote: > >Can you create a sample program and send it? >> >> >>Because both methods should work (without -d flag) >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >>>________________________________ >>> From: sergey lavrov <ccp...@gm...> >>>To: cpp...@li... >>>Sent: Sunday, March 25, 2012 8:00 PM >>>Subject: Re: [Cppcms-users] localization problem >>> >>> >>> >>>Hello Artyom! >>> >>> >>>I tried use -d flag as described in wiki http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. >>>I also tried using cppcms version 1.0.1 and 0.999.0 but have the same result. >>>So I get stuck with it and haven't any ideas. >>> >>> >>>On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> wrote: >>> >>>Do you use any cppcms_tmpl_cc flags like -d domain? >>>>Basically it seems strange. >>>> >>>> >>>> >>>> >>>>> >>>>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov <ccp...@gm...> wrote: >>>>> >>>>>Dear All! >>>>>> >>>>>> >>>>>> >>>> >>>>>>In controller I have: >>>>>>context().locale("ru_RU.UTF-8"); >>>>>>render("skin", "test", content); >>>>>>response().out() << "test: "<< translate("test"); >>>>>> >>>>>> >>>> >>>> >>>>Both should work. response().out() should have a proper locale. >>>> >>>>Artyom >>>> >>>>------------------------------------------------------------------------------ >>>>This SF email is sponsosred by: >>>>Try Windows Azure free for 90 days Click Here >>>>http://p.sf.net/sfu/sfd2d-msazure >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>> >>>------------------------------------------------------------------------------ >>>This SF email is sponsosred by: >>>Try Windows Azure free for 90 days Click Here >>>http://p.sf.net/sfu/sfd2d-msazure >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >>------------------------------------------------------------------------------ >>This SF email is sponsosred by: >>Try Windows Azure free for 90 days Click Here >>http://p.sf.net/sfu/sfd2d-msazure >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > >------------------------------------------------------------------------------ >This SF email is sponsosred by: >Try Windows Azure free for 90 days Click Here >http://p.sf.net/sfu/sfd2d-msazure >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: sergey l. <ccp...@gm...> - 2012-03-26 12:00:25
|
I recompile cppcms using instruction at http://cppcms.com/wikipp/en/page/cppcms_1x_build (console cmake, nmake) but still have problem. 1. I use skin.dll. 2. I have define DLL_EXPORT in skin. 3. I always link with the same cppcms.lib and booster.lib in exe and in skin VS projects. It's hardcoded in VS projects file so it's can't be different. On Mon, Mar 26, 2012 at 12:58 PM, Artyom Beilis <art...@ya...> wrote: > Ok, I see.... > > (Argggrrr Windows ... ) > > > I compiled the code > > g++ -Wall -DDLL_EXPORT=1 test.cpp -lcppcms -lbooster -o test.exe > > g++ -Wall -DDLL_EXPORT=1 -shared test_skin2.cpp -lcppcms -lbooster -o > cygtest_skin.dll > > And it works perfectly well :-) > > I looked into the project files and found following dependencies: > > Z:\libraries\cppcms\cppcms-1.0.0\build\Debug\cppcms.lib > Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\booster.lib > Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\libbooster.lib > > > > cppcms.lib - is import library for cppcms.dll > > booster.lib - is import library for booster.dll > libbooster.lib - is STATIC booster library. > > I assume there is a mixup of some symbols. > > I assume what happens is that main program and the dll use two different > versions > of symbols that is why the localization facets installed in main program > are not visible in DLL. > > > Two things: > > 1. When you use dynamically loaded view you **must** use DLLs > > 2. It is good idea to add DLL_EXPORT define to your projects (so you'll > get correct import symbols > > 3. You should always link with cppcms.lib and booster.lib unless you > create fully statically linked > projects. > > Once you clean all the dependencies as required it would work. > > Additional small notes. > > Did you build cppcms with nmake files or with MSVC project? > > According to the layout it looks like you created it with MSVC > project instead of nmake. > > VS projects are not supported. > > Please build cppcms in release and debug mode indepenently > using CMake + NMake. The reason that there are different > configurations for debug and release that can't be done > using VS project. > > For example in debug it should be cppcmsd.dll and boosterd.dll > cppcmsd.lib and boosterd.lib. > > It seems that your debug build uses "release" file names. > > It may lead to the same mixup as well. > > > Best Regards, > > > Artyom Beilis > ------------- > > Support CppCMS by donating money: > https://sourceforge.net/donate/index.php?group_id=209965 > > > > > > > >________________________________ > > From: sergey lavrov <ccp...@gm...> > >To: cpp...@li... > >Sent: Monday, March 26, 2012 10:12 AM > >Subject: Re: [Cppcms-users] localization problem > > > > > >Hello Artyom! > > > > > >I sent to your email VS project that reproduce such behavior. > > > > > >On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> > wrote: > > > >Can you create a sample program and send it? > >> > >> > >>Because both methods should work (without -d flag) > >> > >>Artyom Beilis > >>-------------- > >>CppCMS - C++ Web Framework: http://cppcms.com/ > >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > >> > >> > >> > >>>________________________________ > >>> From: sergey lavrov <ccp...@gm...> > >>>To: cpp...@li... > >>>Sent: Sunday, March 25, 2012 8:00 PM > >>>Subject: Re: [Cppcms-users] localization problem > >>> > >>> > >>> > >>>Hello Artyom! > >>> > >>> > >>>I tried use -d flag as described in wiki > http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but > unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. > >>>I also tried using cppcms version 1.0.1 and 0.999.0 but have the same > result. > >>>So I get stuck with it and haven't any ideas. > >>> > >>> > >>>On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> > wrote: > >>> > >>>Do you use any cppcms_tmpl_cc flags like -d domain? > >>>>Basically it seems strange. > >>>> > >>>> > >>>> > >>>> > >>>>> > >>>>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov < > ccp...@gm...> wrote: > >>>>> > >>>>>Dear All! > >>>>>> > >>>>>> > >>>>>> > >>>> > >>>>>>In controller I have: > >>>>>>context().locale("ru_RU.UTF-8"); > >>>>>>render("skin", "test", content); > >>>>>>response().out() << "test: "<< translate("test"); > >>>>>> > >>>>>> > >>>> > >>>> > >>>>Both should work. response().out() should have a proper locale. > >>>> > >>>>Artyom > >>>> > > >>>>------------------------------------------------------------------------------ > >>>>This SF email is sponsosred by: > >>>>Try Windows Azure free for 90 days Click Here > >>>>http://p.sf.net/sfu/sfd2d-msazure > >>>>_______________________________________________ > >>>>Cppcms-users mailing list > >>>>Cpp...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >>>> > >>> > > >>>------------------------------------------------------------------------------ > >>>This SF email is sponsosred by: > >>>Try Windows Azure free for 90 days Click Here > >>>http://p.sf.net/sfu/sfd2d-msazure > >>>_______________________________________________ > >>>Cppcms-users mailing list > >>>Cpp...@li... > >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >>> > >>> > >>> > > >>------------------------------------------------------------------------------ > >>This SF email is sponsosred by: > >>Try Windows Azure free for 90 days Click Here > >>http://p.sf.net/sfu/sfd2d-msazure > >>_______________________________________________ > >>Cppcms-users mailing list > >>Cpp...@li... > >>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > >> > > > > >------------------------------------------------------------------------------ > >This SF email is sponsosred by: > >Try Windows Azure free for 90 days Click Here > >http://p.sf.net/sfu/sfd2d-msazure > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: sergey l. <ccp...@gm...> - 2012-03-26 12:09:39
|
Now I have inclusion in main project and skin: Z:\libraries\cppcms\cppcms-1.0.0\build\lib\cppcms-d.lib Z:\libraries\cppcms\cppcms-1.0.0\build\lib\booster-d.lib Z:\libraries\cppcms\cppcms-1.0.0\build\lib\libbooster-d.lib Without libbooster-d.lib I can't build nor main project nor skin with error about locale: 1>test_skin.obj : error LNK2001: unresolved external symbol "public: static class std::locale::id booster::locale::base_message_format<char>::id" (?id@ ?$base_message_format@D@locale@booster@@2V02std@@A) 1>Z:\projects\test\Debug\test_skin.dll : fatal error LNK1120: 1 unresolved externals On Mon, Mar 26, 2012 at 4:00 PM, sergey lavrov <ccp...@gm...>wrote: > I recompile cppcms using instruction at > http://cppcms.com/wikipp/en/page/cppcms_1x_build (console cmake, nmake) > but still have problem. > > 1. I use skin.dll. > 2. I have define DLL_EXPORT in skin. > 3. I always link with the same cppcms.lib and booster.lib in exe and in > skin VS projects. It's hardcoded in VS projects file so it's can't be > different. > > > On Mon, Mar 26, 2012 at 12:58 PM, Artyom Beilis <art...@ya...>wrote: > >> Ok, I see.... >> >> (Argggrrr Windows ... ) >> >> >> I compiled the code >> >> g++ -Wall -DDLL_EXPORT=1 test.cpp -lcppcms -lbooster -o test.exe >> >> g++ -Wall -DDLL_EXPORT=1 -shared test_skin2.cpp -lcppcms -lbooster -o >> cygtest_skin.dll >> >> And it works perfectly well :-) >> >> I looked into the project files and found following dependencies: >> >> Z:\libraries\cppcms\cppcms-1.0.0\build\Debug\cppcms.lib >> Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\booster.lib >> Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\libbooster.lib >> >> >> >> cppcms.lib - is import library for cppcms.dll >> >> booster.lib - is import library for booster.dll >> libbooster.lib - is STATIC booster library. >> >> I assume there is a mixup of some symbols. >> >> I assume what happens is that main program and the dll use two different >> versions >> of symbols that is why the localization facets installed in main program >> are not visible in DLL. >> >> >> Two things: >> >> 1. When you use dynamically loaded view you **must** use DLLs >> >> 2. It is good idea to add DLL_EXPORT define to your projects (so you'll >> get correct import symbols >> >> 3. You should always link with cppcms.lib and booster.lib unless you >> create fully statically linked >> projects. >> >> Once you clean all the dependencies as required it would work. >> >> Additional small notes. >> >> Did you build cppcms with nmake files or with MSVC project? >> >> According to the layout it looks like you created it with MSVC >> project instead of nmake. >> >> VS projects are not supported. >> >> Please build cppcms in release and debug mode indepenently >> using CMake + NMake. The reason that there are different >> configurations for debug and release that can't be done >> using VS project. >> >> For example in debug it should be cppcmsd.dll and boosterd.dll >> cppcmsd.lib and boosterd.lib. >> >> It seems that your debug build uses "release" file names. >> >> It may lead to the same mixup as well. >> >> >> Best Regards, >> >> >> Artyom Beilis >> ------------- >> >> Support CppCMS by donating money: >> https://sourceforge.net/donate/index.php?group_id=209965 >> >> >> >> >> >> >> >________________________________ >> > From: sergey lavrov <ccp...@gm...> >> >To: cpp...@li... >> >Sent: Monday, March 26, 2012 10:12 AM >> >Subject: Re: [Cppcms-users] localization problem >> > >> > >> >Hello Artyom! >> > >> > >> >I sent to your email VS project that reproduce such behavior. >> > >> > >> >On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> >> wrote: >> > >> >Can you create a sample program and send it? >> >> >> >> >> >>Because both methods should work (without -d flag) >> >> >> >>Artyom Beilis >> >>-------------- >> >>CppCMS - C++ Web Framework: http://cppcms.com/ >> >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >> >> >> >> >>>________________________________ >> >>> From: sergey lavrov <ccp...@gm...> >> >>>To: cpp...@li... >> >>>Sent: Sunday, March 25, 2012 8:00 PM >> >>>Subject: Re: [Cppcms-users] localization problem >> >>> >> >>> >> >>> >> >>>Hello Artyom! >> >>> >> >>> >> >>>I tried use -d flag as described in wiki >> http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but >> unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. >> >>>I also tried using cppcms version 1.0.1 and 0.999.0 but have the same >> result. >> >>>So I get stuck with it and haven't any ideas. >> >>> >> >>> >> >>>On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> >> wrote: >> >>> >> >>>Do you use any cppcms_tmpl_cc flags like -d domain? >> >>>>Basically it seems strange. >> >>>> >> >>>> >> >>>> >> >>>> >> >>>>> >> >>>>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov < >> ccp...@gm...> wrote: >> >>>>> >> >>>>>Dear All! >> >>>>>> >> >>>>>> >> >>>>>> >> >>>> >> >>>>>>In controller I have: >> >>>>>>context().locale("ru_RU.UTF-8"); >> >>>>>>render("skin", "test", content); >> >>>>>>response().out() << "test: "<< translate("test"); >> >>>>>> >> >>>>>> >> >>>> >> >>>> >> >>>>Both should work. response().out() should have a proper locale. >> >>>> >> >>>>Artyom >> >>>> >> >> >>>>------------------------------------------------------------------------------ >> >>>>This SF email is sponsosred by: >> >>>>Try Windows Azure free for 90 days Click Here >> >>>>http://p.sf.net/sfu/sfd2d-msazure >> >>>>_______________________________________________ >> >>>>Cppcms-users mailing list >> >>>>Cpp...@li... >> >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >>>> >> >>> >> >> >>>------------------------------------------------------------------------------ >> >>>This SF email is sponsosred by: >> >>>Try Windows Azure free for 90 days Click Here >> >>>http://p.sf.net/sfu/sfd2d-msazure >> >>>_______________________________________________ >> >>>Cppcms-users mailing list >> >>>Cpp...@li... >> >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >>> >> >>> >> >>> >> >> >>------------------------------------------------------------------------------ >> >>This SF email is sponsosred by: >> >>Try Windows Azure free for 90 days Click Here >> >>http://p.sf.net/sfu/sfd2d-msazure >> >>_______________________________________________ >> >>Cppcms-users mailing list >> >>Cpp...@li... >> >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> > >> >> >------------------------------------------------------------------------------ >> >This SF email is sponsosred by: >> >Try Windows Azure free for 90 days Click Here >> >http://p.sf.net/sfu/sfd2d-msazure >> >_______________________________________________ >> >Cppcms-users mailing list >> >Cpp...@li... >> >https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >> > >> > >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > |
From: Artyom B. <art...@ya...> - 2012-03-26 12:17:08
|
> > >Now I have inclusion in main project and skin: >Z:\libraries\cppcms\cppcms-1.0.0\build\lib\cppcms-d.lib >Z:\libraries\cppcms\cppcms-1.0.0\build\lib\booster-d.lib >Z:\libraries\cppcms\cppcms-1.0.0\build\lib\libbooster-d.lib > You can't use both booster.lib and libbooster.lib - that is why you get the problem. Fix it. > >Without libbooster-d.lib I can't build nor main project nor skin with error about locale: >1>test_skin.obj : error LNK2001: unresolved external symbol "public: static class std::locale::id booster::locale::base_message_format<char>::id" (?id@?$base_message_format@D@locale@booster@@2V02std@@A) >1>Z:\projects\test\Debug\test_skin.dll : fatal error LNK1120: 1 unresolved externals > Add DLL_EXPORT define to the project (both main program and the DLL) Artyom |
From: Artyom B. <art...@ya...> - 2012-03-26 12:19:19
|
>2. I have define DLL_EXPORT in skin. No you don't grep DLL_EXPORT * does not show any result Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: sergey l. <ccp...@gm...> - 2012-03-26 15:08:58
|
I just added DLL_EXPORT to main project, recompile it and it worked! Thank you very much. On Mon, Mar 26, 2012 at 4:19 PM, Artyom Beilis <art...@ya...> wrote: > >2. I have define DLL_EXPORT in skin. > > No you don't > > grep DLL_EXPORT * > > > does not show any result > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |