Nico
  • Posts: 61
  • Joined: 16/07/2008
Hi everybody.

I would need somebody to explain me the way the .xml language files work with the code. I work with 1.9.3, and build my new .dll when needed thanks to the source.


The fact is that I have added some new tags, modified some others, in English but also in French and Chinese and that it is really not clear why sometimes these modifications are taken into account or not.

I know that some of them (such as Inbox, Search...that are in the header) need to be taken into account during the compilation, and I so built new .dll. But sometimes I see some modifications, sometimes not, I tried to delete the cache,...no clear answer.

Is there a clear way to proceed after having modified any .xml? Is there a better way that just modify the .xml and then proceed to new total installation of YAF (I suppose there is)?

Technically speaking, I would be very interested to know when the .xml are loaded and then what has to be done to load them again without keeping some old (cache?) memory...

Thanks for any explanation if somebody is courageous or has a good answer:wink:
Sponsor
morali
  • Posts: 2
  • Joined: 06/02/2006
Well, it depends on how much languages you need to implement; there are no limitations on the XML file. I have only one language in my forum that is loading, and while I add new tags to localize any control, I just recompile to get a newer dll and upload pages/controls + the new XML file. The problem shall arise once you update a language file and proceed to another language online which is not complete regarding your changes. For example: I tried to localize the
[pages: 5 1,[2],3,4 ...]
in the ForumList control, this pager control is a class file that is rendered with this text statically, so simply I replaced "pages: " with the:
string GetText(string,string)
method that reads from a new tag I called PAGER in a new page I called PAGING. This modification was only done in Arabic which is the local language my forum is about to deploy in, so when I first tested the forum, it didn't load as the default forum language was English, and simply it tried to find the text from the English.xml file for no use, I got the text [PAGING]. So I modified through the admin settings that the forum is Arabic by default and reloaded successfully. You only need to keep track of your changes in case you want to share with other people or to be aware when you are coming to translate he forum to keep track of your own additions/modifications. For more information about how this "localization" thing is done, simply see 'Localizer.cs' in your Yaf/classes/ folder.
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved