There is no set guideline for this, you can do it in a number of ways depending on the size of your website, available localized pages, etc.

Perhaps the easiest strategy is for each page to carry an optional language parameter. You can then detect this in your sitelet and serve the appropriate content.

1
2
3
type EndPoint =
    | [<Endpoint "/home"; Query("lang")>] Home of lang: string option
    ...

You can find more info on these in the sitelet documentation. In particular for the above bit, "[<Query("arg1", "arg2", ...)>] on a union case indicates that the fields with the given names must be parsed as GET query parameters instead of path segments. The value of this field must be either a base type (number, string) or an option of a base type (in which case the parameter is optional)."

Once you have the language info in your sitelet, there are various strategies to serve actual language-specific content. You can do some pretty sophisticated things, let me know what your actual use case is and I will try to help with those.

By on 10/29/2015 7:32 AM ()

Sorry for the delay. I'm not worrying about the routing part, but the resource management part (localized strings, etc). Can I use an resx resurce file inside an F# project? Any better alternatives?

By on 11/8/2015 3:41 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper