Problem in Translational invariance In Shankar's QM (second edition, p-282), There are some equations are given, They are following as,
$$T(\epsilon)|x\rangle = |x + \epsilon \rangle$$
where $T(\epsilon)$ is Translation operator.
I understood equation given above, but Shankar says, "X is basis is not unique" then general result should be given as below,
$$T(\epsilon)|x\rangle = e^{i\epsilon g(x)/\hbar}|x+\epsilon\rangle \tag{11.2.10}$$
Here what is $g(x)$ ?  Definitely $e^{i\epsilon g(x)/\hbar}$ is periodic in nature. So how could we relate  this periodic function with the non-uniqueness of basis?
Edit: I know in 7 th chapter of Shankar it's given that basis is not unique, but I don't know that how non-uniqueness of that basis is related to exponential.
 A: Note that $|x+\epsilon\rangle$ and $e^{i\epsilon g(x)/\hbar}|x+\epsilon\rangle$ represent the same state (both kets belong to the same ray). 

Here what is g(x) ?

From Shankar (2nd edition), exercise 7.4.8

This exercise teaches us that the "X basis" is not unique, given a
  basis $|x\rangle$, we can get another $|\tilde{x}\rangle$, by
  multiplying by a phase factor which changes neither the norm nor the
  orthogonality.

Earlier in the exercise, Shankar writes:

$$|\tilde{x}\rangle = e^{ig(X)/\hbar}|x\rangle =
 e^{ig(x)/\hbar}|x\rangle$$
where
$$g(x)=\int^xf(x')dx'$$

and then asks you to verify that, in the new X basis
$$P\rightarrow -i\hbar\frac{d}{dx} + f(x)$$
Thus, specifying only that the translation operator $T(\epsilon)$ translates the state (ray) from a particle located at $x$ to the state of a particle located at $x + \epsilon$, leaves a degree of freedom since (as written above) $|x+\epsilon\rangle$ and $e^{i\epsilon g(x)/\hbar}|x+\epsilon\rangle$ represent the same state.
It must be further specified that the translation takes $\langle P\rangle \rightarrow \langle P\rangle$ to "reduce $g$ to a harmless constant (which can be chosen to be zero)." 
