gettext - 无法获得立陶宛语言代码

时间:2017-11-15 01:51:28

标签: php gettext

我对我的网站提出了gettext的建议,我提供了15种不同的翻译,但只有一种

立陶宛 - 我似乎无法弄清楚语言/国家/地区代码是否有效。

#create combination df
Combn <- data.frame(t(combn(as.vector(rep(LETTERS[1:26])),2))) %>% 
  mutate_all(as.character)

#create data df
Nrows <- 1000000
Data <- data.frame(Symbol=rep(LETTERS[1:26])) %>% 
  mutate(Symbol=as.character(Symbol)) %>% 
  bind_rows(replicate(Nrows-1,.,simplify=FALSE)) %>% 
  arrange(Symbol) %>% 
  group_by(Symbol) %>% 
  mutate(Idx=seq(1:Nrows)) %>% 
  mutate(Px=round(runif(Nrows)*20)) 

FnPDList <- function(Combn,Data){      
  Dfs <- list()      
  for(i in 1:nrow(Combn)){
    print(i)
    Symbol.1 <- Combn$X1[i]
    Symbol.2 <- Combn$X2[i]

    Sym.2 <- Data %>% 
      filter(Symbol==Symbol.2) 

    Df <- Data %>% 
      filter(Symbol==Symbol.1) %>%
      left_join(Sym.2,by="Idx",suffix=c(".1",".2"))

    Dfs[[i]] <- Df
  }      
  return(Dfs)
}

#splitting into n parts works
X <- FnPDList(slice(Combn,1:10),Data)
Z <- do.call(bind_rows,X) 

#trying to solve in one go exhausts memory
X <- FnPDList(Combn,Data)
Z <- do.call(bind_rows,X) 

我首先在我的包装盒上检查putenv("LC_ALL=lt_LT"); setlocale(LC_ALL, "lt_LT"); bindtextdomain("messages", "/home/path/to/locale"); textdomain("messages"); bind_textdomain_codeset("messages", 'UTF-8'); ,然后启用以下功能

locale -a

我已经尝试了所有这三项但它们无法正常工作。

我可以尝试任何其他代码的想法吗?

0 个答案:

没有答案