小编bxN*_*xN5的帖子

在Yii2应用程序中设置全局语言值

我在哪里可以在全球范围内设置语言(基于用户的cookie)?如何使它在整个应用程序(控制器,视图等)中工作?

在我找到的文档中 \Yii::$app->language = '';,我可以编写逻辑以正确的方式更改语言?

php yii2 yii2-advanced-app

14
推荐指数
2
解决办法
3万
查看次数

尝试在 React-Native Firebase 中使用电话身份验证时,iOS 模拟器中的应用程序崩溃

我已按照文档进行操作并进行了必要的设置,但应用程序在启动时崩溃了。我无法弄清楚为什么会发生这种情况。有人使用过 rnfirebase 吗?面临这个问题?

import React, { Component } from 'react';
import { View, Button, Text, TextInput, Image } from 'react-native';

import firebase from 'react-native-firebase';

const successImageUri = 'https://cdn.pixabay.com/photo/2015/06/09/16/12/icon-803718_1280.png';

export default class App extends Component {
  constructor(props) {
    super(props);
    this.unsubscribe = null;
    this.state = {
      user: null,
      message: '',
      codeInput: '',
      phoneNumber: '+44',
      confirmResult: null
    };
    firebase.initializeApp({
      apiKey: 'AIzaSyAvKPtsqqqGjkGLkXD8BeqOR6GwJaI2AcE',
      appId: '1:170852024080:ios:9bb19d2f74715186',
      messagingSenderId: '170852024080',
      projectId: 'chatapp-7c693',
      authDomain: 'chatapp-7c693.firebaseapp.com',
      databaseURL: 'https://chatapp-7c693.firebaseio.com',
      storageBucket: 'chatapp-7c693.appspot.com'
    });
  }

  componentDidMount() {
    this.unsubscribe = firebase.auth().onAuthStateChanged(user => {
      if …
Run Code Online (Sandbox Code Playgroud)

react-native react-native-firebase

2
推荐指数
1
解决办法
2280
查看次数