Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Replace # in the URL with language version #86

Open
colourfreak opened this issue Oct 29, 2020 · 3 comments
Open

Replace # in the URL with language version #86

colourfreak opened this issue Oct 29, 2020 · 3 comments
Assignees

Comments

@colourfreak
Copy link

Currently, we have:
https://cofix.io/#/income

What is the # made for?

Can we instead add a language version there. Something like https://cofix.io/en/income and https://cofix.io/zn/income
Let me explain why this is important to me. In Google Analytics I need to know which version is used. And I can't make filters for each subcategory /zn/ or /en/. Knowing in which language users can't complete a goal is very useful. If we would be able to find that 10% completed a goal on the English version vs 50% completed the same goal in the Chinese version. Maybe there is a problem with the translation then.

https://www.datadrivenu.com/multilingual-tracking-google-analytics/

Here is a tutorial on how to set this up. I don't know what is regex.

@foxgem
Copy link
Contributor

foxgem commented Oct 29, 2020

This is a kind of sharp url first used by twitter if my memory not wrong. We can use it to support browser history for a SPA.

We could not use locale as a part of url because all translation is handled by code not by something like static files.

Google Analytics should have some links to help us to know where uses from.

@foxgem foxgem assigned foxgem and unassigned bitcoinwarrior1 Oct 29, 2020
@foxgem
Copy link
Contributor

foxgem commented Oct 29, 2020

My bad, it seemed that we can use some angular router tricks to implement that. I will assign this issue to me, thanks.

huweihong added a commit that referenced this issue Nov 9, 2020
remove # from url  and add language into url

✅ Closes: #86
@huweihong huweihong reopened this Nov 9, 2020
@foxgem
Copy link
Contributor

foxgem commented Nov 22, 2020

we tried several methods to implement this issue, but not very successful: we could make url show locale info in browser, but if refreshing current page, 404 will be returned.

The reason is # used by the internal (that is web server will still use # ), changing browser representation will not effect on it. When refreshing, the url sent by browser will be unknown to server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants